]> git.xonotic.org Git - xonotic/gmqcc.git/blob - data/vars.qc
932df97f1c6806fe68bef927c9785c02b3c352eb
[xonotic/gmqcc.git] / data / vars.qc
1 /* this is the WIP test for the parser...
2  * constantly adding stuff here to see if things break
3  */
4 void(string)        print  = #1;
5 void(string,string) print2 = #1;
6 void(string,string,string) print3 = #1;
7 string(float)       ftos   = #2;
8 entity()            spawn  = #3;
9 void(entity)        kill   = #4;
10
11 .void(string x) printit;
12
13 float(vector different_name, vector b) dot;
14
15 float(vector a, vector b) dot = {
16     return a * b;
17 };
18
19 void(string x) myprintit = {
20     print3("-> ", x, "\n");
21 };
22
23 void() main = {
24     local entity pawn;
25     print3("should be 1: ", ftos(dot('1 1 0', '1 0 0')), "\n");
26
27     pawn = spawn();
28     pawn.printit = myprintit;
29     pawn.printit("Hello");
30 };