Syntax?

Posted by Madrox on Sat 16 Sep 2006 01:24 AM — 4 posts, 19,362 views.

#0
Hi, I was wondering what the proper syntax for "printing" a variable is.

Something like:

You have <var> use <var> to heal
I have all the captures, and a script to figure cures. But Just don't know syntax
Australia Forum Administrator #1
http://www.gammon.com.au/scripts/doc.php?function=Note
#2
Aye, I know about world note, but I mean how do I include variables. If I do world.note ("You are afflicted with @affliction heal it with @heal") wont it print just that?
Australia Forum Administrator #3
If they are MUSHclient variables (not VBscript variables), and you have "expand variables" checked, and that is in a "send to script", then it will work as you have written it (except for the brackets).

However if you are in a script file, then you need to get the variable separately, like this:


Note "You are afflicted with " & GetVariable ("affliction") & " heal it with " & GetVariable ("heal")


That was for MUSHclient variables (which are stored in the world file). If they are VBscript variables then it is a bit simpler:


Note "You are afflicted with " & affliction & " heal it with " & heal