switch /case error

Posted By: WINBERRY

switch /case error - 09/17/07 15:55

For whatever reason, I am unable to use switch/case.
I have upgrades to A7
I have both
#include <acknex.h>
#include <default.c>
with a path to \\include

whever I try anything like this:
function test()
{
var qwert;
qwert = 1;
switch(qwert)
{
case 1:
a = 2;
break;
case 2:
a = 3;
break;
default:
a = 4;
break;
}
}

I get an error telling me I have an illegal character after :
and it goes on to tell me I'm missing a WHILE statement

thanks,
Any help is appreciated
Posted By: Shadow969

Re: switch /case error - 09/17/07 16:03

have you defined "a" before?
Posted By: hack-panther

Re: switch /case error - 09/17/07 16:17

Your code must be in a "*.c" and not in a "*.wdl"...

Then it works...

For write a path you must have a wdl-file with the same name like the c-file and
write the path in it. (PATH "files\\models"; etc...)
© 2024 lite-C Forums