Bruce
Active member
Hello everyone,
First of all, I know this code works:
But
This code is giving me an error:
The error message was the case requires an integer or string.
Isn't openborconstant the inetger or string?
How can I set this up with openborconstant?
I know I can do it with if-else statements, but I wanted to set it up with case statements.
Thank you
First of all, I know this code works:
Code:
switch(AttackType){
case 1:
return
break;
case 2:
return
break;
default :
return
break;
}
But
This code is giving me an error:
Code:
switch(AttackType){
case openborconstant("ATK_NORMAL11"):
return setspawnentry("name", "Burn1");
break;
case openborconstant("ATK_NORMAL12"):
return setspawnentry("name", "Shock1");
break;
default :
return setspawnentry("name", "");
break;
}
The error message was the case requires an integer or string.
Isn't openborconstant the inetger or string?
How can I set this up with openborconstant?
I know I can do it with if-else statements, but I wanted to set it up with case statements.
Thank you