/// errorPart1()
/* Declared in the Macros/Constants menu:
* M1=1
* M2=2
* M3=3
*/
// these are obviously duplicates; the compile error
// will always point to "line 0" (line 1 in the script
// editor), even though that line is a comment and the
// actual error is at line 16 (line 17 in the editor).
enum test {
M1,
M2,
M3
}
enum test2 {
a,
b,
c
}
/// errorPart2()
// This results in a "case argument must be constant"
// error, even though the code itself is fine
switch (irandom(10)){
case test2.a:
show_debug_message("...");
break;
case test2.b:
show_debug_message("...");
break;
case test2.c:
show_debug_message("...");
break;
}
// This results in a "malformed assignment statement"
// error, even though the assignment statement itself
// is fine and the real error is in the enum declaration
var blah=test.M1;
Comments
0 B
|👍
/👎
0 B
|👍
/👎
0 B
|👍
/👎