
variable in a message
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
variable in a message
hello, i've been using livecode for sometime now, i have a question, how can i put a variable into a text message for example "answer your new high score is _gHighScore (a variable) but in a way that it actually works? 

Samuele.
Re: variable in a message
Hi Samuele,
welcome to the forum!
You need to create the appropriate string with & like this:
-> & "adds" two strings:
put "text1" & "text" -> text1text2
-> && "adds" two strings with a SPACE:
put "text1" && "text" -> text1 text2
Best
Klaus
welcome to the forum!
You need to create the appropriate string with & like this:
Code: Select all
...
answer "Your new high score is" && _gHighScore
...
put "text1" & "text" -> text1text2
-> && "adds" two strings with a SPACE:
put "text1" && "text" -> text1 text2
Best
Klaus