Re: Argument not being accepted by function
Status: Alpha
Brought to you by:
cwalther
From: Christian W. <cwa...@gm...> - 2011-10-11 19:28:41
|
> Is this what you meant by quotation marks? > playVid("stairDoorOpenLeft", 20, 4, 333, 400, 15) Yes (but I don't know if it's what *you* meant). > If so, there's apparently another problem. Now pipmak gives another error message, but this time it says that "global patch" is a "nil value", which is odd because it's obviously nothing of the sort, it's just a regular patch object, as you can see in my function, not a global. Then you're calling the function at another time than node loading, and the error message is completely correct. It's not talking about any patch object, it's talking about the global function "patch" that you're trying to call here. The configuration functions like "patch" are only available at node loading time and are nil otherwise. You shouldn't think of them as functions, but as declarative statements. See <http://thread.gmane.org/gmane.games.devel.pipmak.user/721/focus=722>. You currently can't create new patches while a node is running, all patches you need must already be present in the original node configuration. (Calling this same playVid() function at node loading time however isn't a good idea either, you shouldn't schedule timers or perform other actions at node loading time - it will currently work, but in a future version the node description may also be loaded at other times than when you enter the node it, e.g. to populate a project map. You must separate the creation of the patch and the starting of the animation.) -Christian |