Schedule Oddity in iTGB v1.2
by Dave Calabrese · in iTorque 2D · 05/31/2009 (11:35 am) · 0 replies
I'm finding whenever I assign a schedule to an object (IE: %this.schedule(time,method,arg1,arg2);), the schedule occurs properly, however I receive a message in the console saying it did not have all the arguments. Here's the rather standard error:
Anyone know what's up with that? It seems like the error is being incorrectly displayed...
SimObject::schedule - wrong number of arguments. usage: (time , command , <arg1 ... argN> ) Use the schedule method to schedule an action to be executed upon this object time milliseconds in the future. The major difference between this and the schedule console function is that if this object is deleted prior to the scheduled event, the event is automatically canceled. times should not be treated as exact since some 'simulation delay' is to be expected. The minimum resolution for a scheduled event is "32 ms, or one tick. schedule does not validate the existence of command. i.e. If you pass an invalid console method name, the schedule() method will still return a schedule ID, but the subsequent event will fail silently. @param time Time in milliseconds till action is scheduled to occur. @param command Name of the command to execute. This command must be scoped to this object (i.e. It must exist in the namespace of the object), otherwise the schedule call will fail. @param arg1...argN These are optional arguments which will be passed to command. This version of schedule automatically passes the ID of %obj as arg0 to command. @return Returns an integer schedule ID. @sa See the schedule console function and its corresponding helper functions.
Anyone know what's up with that? It seems like the error is being incorrectly displayed...
About the author