Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to: script Artificial Intelligence
#34
Well just like normal mathematics you need to open and close your braces properly.
Your second if statement is missing the {do stuff}.
if (abs(self.x-target.x) > 0 && (self.state == 2 || self.state == 0)) { }
And I think you are missing/closing other {/} braces too.

First return 1;} closes the main ego() function (this should happen at the end).
Second if after long/mid again is missing braces. if (abs(self.x-target.x) > 0 && (self.state == 1 || self.state == 0)) { }

Maybe use Someoneelse's data changer and choose new AI file, it will make braces that belong together bold when your cursor is near them.
Reply
Thanks given by: Memento


Messages In This Thread
RE: How to: script Artificial Intelligence - by YinYin - 05-02-2013, 11:23 AM



Users browsing this thread: 4 Guest(s)