Jump to content

problem with variable


Casablanca
 Share

Recommended Posts

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 & :D

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

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 by Phaser
Link to comment
Share on other sites

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)

Thanks for the fast reply :-)

But this only adds (Your text $roll $var2) on the message for 2 seconds

im trying to use Random() to get me a random entry from the other list

lets say Random(1, 7, 1) becomes 5. then i want it to get the $5 from my entry and return that as the message

Maybe im using the wrong method for this, suggestions ?

Edited by Casablanca
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...