mzscript !if not working Thread last updated on 2004-06-09 11:11:23

Posted by member 168857 on 2004-06-08 16:07:59

at the moment i can set vars, but !if statements do anything eg, i got this from a tutorial,
*Script bang !yes
*Script exec !VarSet yes "1"
*Script ~bang

*Script bang !no
*Script exec !VarSet no "1"
*Script ~bang

*Script bang !areyouwell
*Script exec !confirm "Are you well?" !yes !no
*Script exec !IfExist "yes" [!msgbox Good - hope you stay that way]
*Script exec !IfExist "no" [!msgbox Oh dear - hope things improve]
*Script exec !VarRemove yes
*Script exec !VarRemove no
*Script ~bang

I have in another place:
*NetLoadModule textedit-2.4l-13
*NetLoadModule mzscript-0.9-beta_12.dll
*mzScriptFile "$themedir$script.rc"
mzScriptNewSyntax
mzAutosaveVars replace

TextEditNewSyntax
mzAutosaveVars replaceinclude




Posted by member 32550 on 2004-06-08 20:42:43 link

wrong syntax:
!ifeq

Posted by member 168857 on 2004-06-09 03:59:40 link

shouldn't plain old !if work also? because that doesnt work. With your syntax change I get a problem:
-------
Exception during bang command execution.
Please contact the module author
Bang parameters: "no" [!msgbox "message"]
-------

[link]http://www.leechprint.com/phil/Readmes/mzscript.htm[/link] also suggests that there is nothing wrong with the previous syntax, although it is for an earlier version.

Posted by member 99 on 2004-06-09 11:11:23 link

Don't put quotes around the var name or brackets around the bang command.