mzscript var problem Thread last updated on 2006-02-24 14:39:03

Posted by member 700 on 2006-02-23 18:15:55

Time for a new thread, and a new problem.

Out of the BLUE my mzscript started saying:
"Invalid or misplaced token "var":
*Script var mousey "(null)".
Continue parsing?


It continues like this as it goes through all of mzscripts built in variables. This happens each time I reload litestep.

I don't have Any idea why it's doing this and I don't know exactly caused it. I think it started happening when I switched from one theme to another and back again.

Posted by member 212670 on 2006-02-23 19:37:51 link

What version of mzscript are you using? Use 1.0-rc2 or 0.9.13.

Judging by that syntax (*Script var), you're using a really old version. To answer the question, it looks like you have an undefined variable.

Posted by member 700 on 2006-02-23 22:55:39 link

I'm using 1.0-rc2. It was working fine and then out of the blue this stuff shows up. I don't get the error if its on 0.9.13, but when I switch it to 1.0-rc2 the problem comes back.

Posted by member 212670 on 2006-02-23 23:17:18 link

If you started writing scripts with mzscript in 0.9.13, you can't switch halfway through to 1.0-rc2, and vice versa. Atleast not without some changes to what you've already written. Not saying you did that, just mentioning it, because some of their syntax isn't compatible. That would explain why you're getting errors with one version and not the other. You have to pick one to stick with. Either versions are good. I personally prefer 1.0-rc2, though, but you can't have ;comments in your vars file if you use it.

Posted by member 700 on 2006-02-23 23:56:30 link

Yeah, I've switched everything over to 1.0... I mean, all of my scripts run perfectly after I get a whole slew of those "var" messages.

Posted by member 700 on 2006-02-24 00:04:11 link

Ok, I found out what the problem was... there is a step.rc file in the "X:\Litestep" folder that had the values:
*Script var mousey "(null)"
*Script var mousex "(null)"
*Script var second "(null)"
*Script var minute "(null)"
*Script var hour "(null)"
*Script var weekday "(null)"
*Script var day "(null)"
*Script var month "(null)"
*Script var year "(null)"
*Script var yresolution "(null)"
*Script var xresolution "(null)"

Those were located at the top of it... so mzscript didn't like that very much. I just removed them from the file and it's fine now. If anyone else has the problem, there's the answer. Or maybe it's just me?

Posted by member 212670 on 2006-02-24 00:28:53 link

It's you. Mzscript doesn't use those settings anymore. It gets its vars from the file you define with *mzVarFile. Check out its readme file.

Posted by member 1 on 2006-02-24 00:58:21 link

must have been part of your script that you missed as those aren't defined in the standard LS installs.

Posted by member 700 on 2006-02-24 14:39:03 link

Yeah, not sure where the stuff came from cause I don't use that file at all. Oh well.