Jump to content

Recommended Posts

Posted

Ok so I have searched and read some threads but I am not grasping this, is it true that you can't do this...

$HOTBAR_VALUE = Eval("$CUSTOM_HOTBAR_" & $CMD_CUSTOM)

...so in this instance $CMD_CUSTOM is present and is equal to 1 so the variable I am trying to access is $CUSTOM_HOTBAR_1 but I am not getting anything.

Posted

Lose the dollar sign in the eval function.

Here's a script you can study:

$CUSTOM_HOTBAR_1 = 50
$CUSTOM_HOTBAR_2 = 100

$CMD_CUSTOM = 1
$HOTBAR_VALUE = Eval("CUSTOM_HOTBAR_" & $CMD_CUSTOM)

MsgBox(0, "Test", "$HOTBAR_VALUE: " & $HOTBAR_VALUE)

$CMD_CUSTOM = 2
$HOTBAR_VALUE = Eval("CUSTOM_HOTBAR_" & $CMD_CUSTOM)

MsgBox(0, "Test", "$HOTBAR_VALUE: " & $HOTBAR_VALUE)
Posted (edited)

The example in the help file would inform you that...

$HOTBAR_VALUE = Eval("CUSTOM_HOTBAR_" & $CMD_CUSTOM)
is correct

<{POST_SNAPBACK}>

A little condesending there Larry but thanks, I missed that detail when I was looking at the example, and yes I did look at it.

It might help, to add that as a note to the help file that you have to omit the $ for those as unobservant as me.

Edited by Hooch
Posted

A little condesending there Larry but thanks, I missed that detail when I was looking at the example, and yes I did look at it.

<{POST_SNAPBACK}>

..oh and thanks as well Slim :ph34r:
Guest BL@(K-R34P3R
Posted

What kind of job did you get fired from? How could they fire you! You're Larry!

Guest BL@(K-R34P3R
Posted

=/ SOrry to hear that. Their loss.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...