Page 1 of 1

[UVar: x, type: Double, value: 80.55] How to use value?

Posted: 28 Aug 2011, 18:33
by Fantasticx
I trace trace(user.getVariable(USERVAR_X));

and I get this

[UVar: x, type: Double, value: 80.55]

I want to use "value: 80.55"


so I put user.getVariable(USERVAR_X).type I get Double but when I put

user.getVariable(USERVAR_X).value I get and error.

anyway to get value: 80.55?

Posted: 28 Aug 2011, 18:37
by jamalsoueidan
user.getVariable(USERVAR_X)..getDoubleValue()

:D

you first get the variable by key and then tell sfsx2 what type you want to receive...

Posted: 28 Aug 2011, 18:38
by Fantasticx
NeverMind I figure out the problem



Problem : getIntValue() only gets a hole number .(10)

getDoubleValue() get hole number and decimal number like(10.4)

Posted: 28 Aug 2011, 18:39
by Fantasticx
jamalsoueidan wrote:user.getVariable(USERVAR_X)..getDoubleValue()

:D

you first get the variable by key and then tell sfsx2 what type you want to receive...
FAST POST, btw i already figure out the problem before u even post.

Thanks you anyways dude

Posted: 28 Aug 2011, 18:41
by jamalsoueidan
This is one of the great thing that SFS2X offers... :D

Fast support :D