Page 1 of 1
Where am I going wrong.
Posted: Sun Oct 31, 2004 4:21 pm
by RDPidb
Here is some code I am trying to get to work:
/declare MobArray[2,2] int outer
/varset MobArray[1,1] "-2331"
/varset MobArray[1,2] "-1676"
/echo ${MobArray[1,1]}
/echo ${MobArray[1,2]}
Results in:
[MQ2] 0
[MQ2] 0
Any ideas why its not displaying the locs?
Thanks
Posted: Sun Oct 31, 2004 4:25 pm
by Night Hawk
Does ${MobArray[2,1]} and ${MobArray[2,2]} need to be set?
Posted: Sun Oct 31, 2004 4:29 pm
by blueninja
Just a thought, not sure if it'll work but try without the quotes around the numbers. Only time you need those are when you have a string containing whitespace.
Posted: Sun Oct 31, 2004 5:01 pm
by eqjoe
Dude.. use code brackets please.
-j
Posted: Sun Oct 31, 2004 5:10 pm
by Cr4zyb4rd
edit: I am teh dumbass :)
Posted: Sun Oct 31, 2004 5:17 pm
by eqjoe
The problem is the quotes. String!=Int and the quotes makes the value a string.
I tested using this using straight up integers with and without the quotes and verified that the quotes are a problem. With quotes your return is 0 everytime.
-j
Posted: Mon Nov 01, 2004 8:11 am
by RDPidb
Ok , thanks guys , works like a charm now.
Sorry for not using code bracets
