Jump to content

I cannot insert variables in texts

Recommended Posts

I've problems with inserting variables in text, like so: MsgBox (1, "", You've winned "$sum" dollars.")

Why? if i control w/ Syntax check prod, it says only "syntax control".

I want to obtain, for example, a window that says me: "You've winned $ 40 betting $ 10 on the horse 'Speed'."

Link to comment
Share on other sites

Opt("ExpandVarStrings", 1)
$sum = 20

; 3 different versions ;)
MsgBox (1, "", "You've winned " & $sum & " dollars.")
MsgBox (1, "", "You've winned $sum$ dollars.")
MsgBox (1, "", StringFormat("You've winned %s dollars.", $sum))

Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Link to comment
Share on other sites

Congratulazioni! (Translation courtesy of google :()

Edited by Fulano

#fgpkerw4kcmnq2mns1ax7ilndopen (Q, $0); while ($l = <Q>){if ($l =~ m/^#.*/){$l =~ tr/a-z1-9#/Huh, Junketeer's Alternate Pro Ace /; print $l;}}close (Q);[code] tag ninja!

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

  • Recently Browsing   0 members

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