Compiles
Inner classes (Sort of), by DivineTraveller:
data_type
proc/do_a_thing()
/cake {
parent_type=/atom
var pie=2;
}
return new/cake();
Questionmarks ahoy! And a mob that is a list.
mob/proc/Test(?) {
var/mob/notAMob[3];
notAMob[1] = 0;
notAMob[2] = 1;
notAMob[3] = 0;
for(. = 1 to notAMob.len) {
? = notAMob[.];
world << "[? ? ? : ?]";
}
}
Zoidberg!
mob/proc/zoidberg(;;;;;;;;;) {
var/mob/?[3];
?[1] = 0;
?[2] = 1;
?[3] = 0;
world << "[?.name] hi";
}
The above actually doesn't crash, it just outputs nothing for ?.name.
Doesn't compile, but throws funny stuff at you
var/mob/bobby/hi[5];
hi[1] = 5;
Gives:
Template.dm:22:error: hi: undefined type: hi
Template.dm:21:warning: hi: variable defined but not used
Without assignment (hi[1] = 5), it compiles. Any reference to the variable, and DM blows up.
var/mob/hi[5];
hi[1] = 5;
Works fine.
Zoidberg returns!
/()
mob/proc/zoidberg(;/()) {
var/mob/?[3];
?[1] = 0;
?[2] = 1;
?[3] = 0;
world << "Ready to crash?";
world << "[?.name] hi";
world << "[().type]";
world << "Hm.";
}
Gives:
Template.dm:29:error: bad embedded expression [()]
It seems to compile anyway, and outputs "type]" on the world < "[().type]" line.
Post more quirks, if you can find them / know of any ;)