data/functions.qc for some more tests

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-08-18 19:39:48 +02:00
parent 40fe52e665
commit 0d4e6a2ee8

29
data/functions.qc Normal file
View file

@ -0,0 +1,29 @@
/* this is the WIP test for the parser...
* constantly adding stuff here to see if things break
*/
void(string) print = #1;
void(string,string) print2 = #1;
void(string,string,string) print3 = #1;
string(float) ftos = #2;
entity() spawn = #3;
void(entity) kill = #4;
.float vis;
.entity other;
float(entity targ) visible = {
return targ.vis;
};
void() main = {
local entity pawn, pawn2;
pawn = spawn();
pawn2 = spawn();
pawn.other = pawn2;
(pawn.other).vis = 0;
if (!visible(pawn.other))
print("Yes\n");
};