Re: Argument not being accepted by function
Status: Alpha
Brought to you by:
cwalther
|
From: James C. W. <jfc...@ya...> - 2011-10-11 18:12:04
|
Hi,
Is this what you meant by quotation marks?
playVid("stairDoorOpenLeft", 20, 4, 333, 400, 15)
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.
Thanks,
James
--- On Mon, 10/10/11, Christian Walther <cwa...@gm...> wrote:
From: Christian Walther <cwa...@gm...>
Subject: Re: Argument not being accepted by function
To: "Content creation for the Pipmak Game Engine" <pip...@li...>
Date: Monday, October 10, 2011, 3:23 PM
> I'm having a bit of difficulty writing up a function to simplify image sequences and make them playable by one line: playVid(stairDoorOpenLeft, 20, 4, 333, 400, 15)
> The first argument specifies the folder the images are in, then the number of frames, then the cube face, the x/y coords, and the framerate. Trouble is when I run it it tells me this : attempt to concatenate local folder, a nil value
The function looks OK in that regard, so if the above is your actual call, then probably the variable stairDoorOpenLeft actually has value nil - have you checked that? Or possibly you didn't mean it to be a variable, but a string literal, i.e. you forgot the quotation marks?
-Christian
> function playVid(folder, frameCnt, face, locX, locY, framerate)
>
> local animpos = 0
> local vid = patch { face = face, x = locX, y = locY, image = " " .. folder .. "/" .. animpos .. ".jpg" }
>
>
> pipmak.schedule(
> framerate,
> function(now, last)
> animpos = animpos + 1
> if animpos > frameCnt then animpos = 0 end
> vid:setimage ( " " .. folder .. "/" .. animpos .. ".jpg" )
> return framerate
> end
> )
> end
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Pipmak-Users mailing list
Pip...@li...
news://news.gmane.org/gmane.games.devel.pipmak.user
https://lists.sourceforge.net/lists/listinfo/pipmak-users
|