Wait command

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
Squall333
Posts: 91
Joined: Thu Apr 28, 2005 5:32 am

Wait command

Post by Squall333 »

is there a wait command i tried wait(5) and it didnt work
Benihana
Posts: 12
Joined: Sun Jul 31, 2005 4:54 am

Post by Benihana »

How about: waitVblankStart(i)
where i = 1/60 second
Squall333
Posts: 91
Joined: Thu Apr 28, 2005 5:32 am

Post by Squall333 »

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
Benihana
Posts: 12
Joined: Sun Jul 31, 2005 4:54 am

Post by Benihana »

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/
Squall333
Posts: 91
Joined: Thu Apr 28, 2005 5:32 am

Post by Squall333 »

Is there an equivalent of mod (%) in lua
like 4 % 2 = 0
chaos
Posts: 135
Joined: Sun Apr 10, 2005 5:05 pm

Post by chaos »

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.
Post Reply