Casablanca Posted September 18, 2009 Share Posted September 18, 2009 I have a problem with variables so i need a push in the right direction (dont even know if it works this way) the idea i have is that your pushing a button to get a msgbox with the accurate text in it the GUI is already made and works perfectly, but when i get to the msgbox i seem to stumble a little now this doesnt work for me, but you get the general idea what im looking for $roll = Random(1, 7, 1) MsgBox(0, "", $$roll) ive seen alot of other guys using && here and there in those kind of situations, but cant find a helpfile on & i also have a few (5374 to be exact) entrys in this form $1 = "first entry" $2 = "second entry" $3 = "third entry" please point me to the direction to the &-helpfile or explain to me what im doing wrong -Cas Link to comment Share on other sites More sharing options...
Phaser Posted September 18, 2009 Share Posted September 18, 2009 (edited) Hope this helps MsgBox(0,"box name", "Your text " & $roll, 2) The 2 at the end is the amount of seconds the box will display for, so you dont have to click "ok", it's a option so doesn't need to be there if you don't want it. If you want more variables to display just add & $var2 like this MsgBox(0,"box name", "Your text " & $roll & $var2, 2) Edited September 18, 2009 by Phaser Link to comment Share on other sites More sharing options...
Casablanca Posted September 18, 2009 Author Share Posted September 18, 2009 (edited) Hope this helpsMsgBox(0,"box name", "Your text " & $roll, 2)The 2 at the end is the amount of seconds the box will display for, so you dont have to click "ok", it's a option so doesn't need to be there if you don't want it.If you want more variables to display just add& $var2 like thisMsgBox(0,"box name", "Your text " & $roll & $var2, 2)Thanks for the fast reply :-)But this only adds (Your text $roll $var2) on the message for 2 secondsim trying to use Random() to get me a random entry from the other listlets say Random(1, 7, 1) becomes 5. then i want it to get the $5 from my entry and return that as the messageMaybe im using the wrong method for this, suggestions ? Edited September 18, 2009 by Casablanca Link to comment Share on other sites More sharing options...
trancexx Posted September 18, 2009 Share Posted September 18, 2009 You probably want something like this: $9 = "Use arrays" $12 = "This is not good." MsgBox(0, Eval(9), Eval(12)) ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Casablanca Posted September 18, 2009 Author Share Posted September 18, 2009 You probably want something like this: $9 = "Use arrays" $12 = "This is not good." MsgBox(0, Eval(9), Eval(12)) Thank you, Eval() solved the problem. I also noticed why "This is not good.", so I rewrote everything with Arrays and its working fantasticly (and better/easier even). Over and Out! -Cas Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now