Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#897 closed defect (fixed)

javascript common api

Reported by: lexa Owned by:
Priority: Nice to Have Milestone: Alpha 7
Component: UI & Simulation Keywords: scripting
Cc: Patch:

Description

In data/mods/public/simulation/ai/base.js

There seem to be an error at line 90:

this.OnUpdate();

Should be

this.OnUpdate(state);

Change History (5)

comment:1 by lexa, 13 years ago

Ok, maybe I was wrong Here it says that OnUpdate takes a message as a parameter... http://svn.wildfiregames.com/docs/writing-components.html

comment:2 by historic_bruno, 13 years ago

Priority: Must HaveNice to Have

The parameter name doesn't matter in JS, state looks like what we're wanting to call it.

comment:3 by Philip Taylor, 13 years ago

That's a different OnUpdate for different scripts - AI and component scripts are almost completely independent and unrelated.

common-api is meant to provide a layer of abstraction on top of the state data, so I think it's better not to pass it to OnUpdate at all.

comment:4 by philip, 13 years ago

Resolution: fixed
Status: newclosed

(In [9888]) Fix inconsistent function prototype (fixes #897)

comment:5 by Kieran P, 13 years ago

Milestone: BacklogAlpha 7
Note: See TracTickets for help on using tickets.