07-30-2012, 12:09 PM
So i decided to rewrite all the old AI chai script to the new angel script AI's.BUT, i keep getting this error: "expected expression value".
Why is that? what did i do wrong??
here is a very simple short code that produces the error:
This code is small, simple AND useless. But still, i keep getting the same error in the "if (((self.x-target.x) => 0) && ((self.x-target.x) =< 80)){" line.
Any kind of help is appreciated.
Why is that? what did i do wrong??
here is a very simple short code that produces the error:
C-Code:
int ego(){ A(0,0); //reset keys D(0,0); J(0,0); up(0,0); down(0,0); left(0,0); right(0,0); for (int i = 0; i < 400; i++){ //target if (loadTarget(i) == 0 && target.num != self.num && target.hp > 0 && target.id < 100 && target.team != self.team){ break; } } int xdist = target.x-self.x; int ydist = target.y-self.y; int zdist = target.z-self.z; int selfacing; int random = rand(4); if (((self.x-target.x) => 0) && ((self.x-target.x) =< 80)){ left() } return 1; } |
This code is small, simple AND useless. But still, i keep getting the same error in the "if (((self.x-target.x) => 0) && ((self.x-target.x) =< 80)){" line.
Any kind of help is appreciated.
A-Engine: A new beat em up game engine inspired by LF2. Coming soon
A-Engine Dev Blog - Update #8: Timeout