Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

(116) Zscript compiler errors

3 replies · 1,145 views · Started 15 January 2007

Whenever I load up moonwalk.z (or a lot of other scripts), I get this message:

Pass 1: Parsing
line 3: syntax error, unexpected IDENTIFIER, on token Void
Fatal Error P00: Can't open or parse input file!

However, it compiles just fine on the older betas...

The script for refrence:

ffc script Link_Moonwalks
{
void run()
{
while (true)
{
if (Link->InputUp)
Link->Y+=4;
if (Link->InputDown)
Link->Y-=4;
if (Link->InputRight)
Link->X-=4;
if (Link->InputLeft)
Link->X+=4;
Waitframe()
}
}
}

Umm, are you sure you didn't rename void to Void by accident? It compiles fine for me, after fixing the missing semicolon after Waitframe() that is...

Hmm... If I delete void run() in the editor and retype it, it works perfectly, but if I import it directly from notepad, it just doesn't work.

And you're sure that importing the SAME file compiles on an old beta and not on the current one? I'm skeptical because the error you're reporting is generated by Flex, which is in turn automatically generated from the ZScript grammar file, which I don't believe has been changed in the recent past.