GiulioM Posted March 24, 2010 Share Posted March 24, 2010 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 More sharing options...
Fulano Posted March 24, 2010 Share Posted March 24, 2010 Missing the &:MsgBox (1, "", You've winned " & $sum & " dollars.") #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 More sharing options...
GiulioM Posted March 24, 2010 Author Share Posted March 24, 2010 Missing the &:MsgBox (1, "", You've winned " & $sum & " dollars.") Thanks. With your help i've comleted my 110-lines code for 3 coin toss in Italiano =)Lancio della moneta.au3 Link to comment Share on other sites More sharing options...
funkey Posted March 24, 2010 Share Posted March 24, 2010 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 tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
darkjohn20 Posted March 24, 2010 Share Posted March 24, 2010 (edited) MsgBox(1, "", "You've won " & $sum & " dollars.") Fixed up a little. Edited March 24, 2010 by darkjohn20 Link to comment Share on other sites More sharing options...
Fulano Posted March 24, 2010 Share Posted March 24, 2010 (edited) Congratulazioni! (Translation courtesy of google ) Edited March 24, 2010 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 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