forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Wait command

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
Squall333



Joined: 28 Apr 2005
Posts: 91

PostPosted: Sat Aug 20, 2005 9:26 am    Post subject: Wait command Reply with quote

is there a wait command i tried wait(5) and it didnt work
Back to top
View user's profile Send private message AIM Address
Benihana



Joined: 31 Jul 2005
Posts: 12

PostPosted: Sat Aug 20, 2005 9:47 am    Post subject: Reply with quote

How about: waitVblankStart(i)
where i = 1/60 second
Back to top
View user's profile Send private message
Squall333



Joined: 28 Apr 2005
Posts: 91

PostPosted: Sat Aug 20, 2005 10:02 am    Post subject: Reply with quote

i dont think that works it says attempt to call to global 'waitvblankstart' (a nil value'
if theres no wait value thats cool i just need a way so that when i say

if pad:cross() then
p=p+1
end

p doesnt equal like 40 by pressing x once
Back to top
View user's profile Send private message AIM Address
Benihana



Joined: 31 Jul 2005
Posts: 12

PostPosted: Sat Aug 20, 2005 12:59 pm    Post subject: Reply with quote

Oops it's screen.waitVblankStart()

Also, Lua is CASE sensitive, therefore you must write that function exactly as you see it here, with a lowercase wait, an upper case V, lowercase blank, and uppercase Start. Otherwise Lua will think you are trying to call some function waitvblankstart, which you have not defined.

http://www.lua.org/pil/
Back to top
View user's profile Send private message
Squall333



Joined: 28 Apr 2005
Posts: 91

PostPosted: Sun Aug 21, 2005 1:16 pm    Post subject: Reply with quote

Is there an equivalent of mod (%) in lua
like 4 % 2 = 0
Back to top
View user's profile Send private message AIM Address
chaos



Joined: 10 Apr 2005
Posts: 135

PostPosted: Sun Aug 21, 2005 1:30 pm    Post subject: Reply with quote

Squall333 wrote:
Is there an equivalent of mod (%) in lua
like 4 % 2 = 0


there is math.mod(a,b)
_________________
Chaosmachine Studios: High Quality Homebrew.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group