Author Topic: Token within decimal if statement  (Read 5143 times)

SavageCore

  • Guest
Token within decimal if statement
« on: June 06, 2016, 08:28:26 PM »
Hi

I'm using EDDI.

I have {INT:currentShip} set to 1 on startup then a loop which checks {INT:currentShip} is <= {INT:Stored ships} (4) and increments {INT:currentShip} to simulate a foreach of an array, this works great.

However this does not extend to Decimal if statements?

What I want to do is:

Code: [Select]
Begin Decimal Compare : [Stored ship {INT:currentShip} distance] Has Been Set
Code: [Select]
Begin Decimal Compare : [Stored ship {INT:currentShip} distance] Is Greater Than 0
If I try and just use a text statement like

Code: [Select]
Begin Text Compare : [{DEC:Stored ship {INT:currentShip} distance}] Has Been Set
It is always true/set

Does this make sense? Any work arounds?

Download a test profile containing this command. It will not work without EDDI setup and such so just for reference...

Thanks


Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: Token within decimal if statement
« Reply #1 on: June 08, 2016, 07:39:02 PM »
There is no support yet for nested tokens.  Once I get that shined up, I can see about making variables that can contain token names (and maybe arrays and all that good stuff).