no prob man
Printable View
no prob man
Would this work?(i just wrote that)Code:time = Timer:new()
score = 0
while true do
if time = time + 1 then
score = score + 5
end
nope that won't work. if I knew sorta what you were trying to accomplish I can try and help.Zitat:
Zitat von MaSt3r_ShAk3
i dont think so because the timer is in miliseconds and the highest framerate is 60 fps so then time is never time+1 but more. you can also just use time as a variable and increment it by 1 each time it goes through the loop.
I want it that every half second the score increases by 5Zitat:
Zitat von Slasher
@altair- how would I do that? just put score = score + 1 at the bottom of the loop?
This would work:
Notice: Put "timeold=time" at the end of the loopCode:when true do
if time/1000=timeold/1000 +1 then
score = score + 5
end
"more code here"
timeold=time
end
BTW Maybe you need to make it like this:
Because the loop is probably not precisely 1 second or a multiple of that. This wont affect the rest of the game because the timer will keep running so you still get 5 points per second. Hope thats clearCode:if time/1000>=timeold/1000 +1 then
NVM the var-thing I didn't know you wanted to do that after each second
Ok.. would i do time = timer:new() before the loop? or store a nil value in time
yeah time = timer:new() before the loop. Also you should start the timer at the beginning of the game. SO maybe something like this:
Code:if start==false then
time:start()
start==true
end
I get, Error: attempt to index global 'timer' (a nil value)...
ok i forgot i just used your code but its like this:
time=Timer.new()
i got this error whats rong?
C:\Documents and Settings\Mori\Desktop\lua \luaplayerwindows>luaplay er rock.lua
error: rock.lua:41: Argument error: The Controls functions take no arguments (an
d also, must be called with a colon from an instance: e g mycontrols:left().
show the rest of your code and atleast line 41
its the one you helped me w/
wtf??? this is annoying "error: Calling 'new' on bad self (number expected, got table)" its reffering to the time = Timer:new()
ah, ill hold off on score til the 2nd release
did you read my last post on that? Its on the bottom of the page before this.
I sain it should be:
time=Timer.new()
Yeah... I still got errors :dry: But I realized I do need it to increase speed every 10 seconds...
its referring to the time = Timer:new()Code:Error: Calling 'new' on bad self (number expected, got table)
its time=Timer.new() NOT time = Timer:new() note the point instead of the double colon
Ah, lemme try it out...
Error: Attempt to perform arithmetic on global 'time' (a userdata value)
i cant get a pause to work... what i would like is for ex
screen:print(10, 20, "BLALALALAL" color1)
-- Have it pause for x amount of time then play the next line
You have to add a screen.waitVblankStart() and put your delay in the (). Keep in mind 60 will have a 1 second delay
that is what did but it seems to add up all the time and have ya wait in the begining
Do you want the same interval between each string?
nope could that be why?
Well, if you wanted different intervals you would be putting screen.waitVblankStart() after every string. Then putting screen.flip() at the end... post ur code
k here it is:Zitat:
----joke
white= Color.new(225,225,225)
brick=Image.load("Smile.p ng")
------ end load
screen.flip()
screen:print(10, 10, "Opening Flash0", white)
screen.waitVblankStart(12 0)
screen:print(10, 20, "Cant Open... Starting Brute Force", white)
screen.waitVblankStart(12 0)
screen:print(10, 25, "jfklafdjoaiudfjkfdajklfd afdjlkadfkl", white)
screen.waitVblankStart(10 )
screen:print(10, 35, "980341809314789312489132 748913298478913", white)
screen.waitVblankStart(10 )
screen:print(10, 40, "324902023423043204023490 234023943204932", white)
screen.waitVblankStart(5)
screen:print(10, 50, "Flash0 Open.. Shuting Down will cuas a brick.", white)
screen.waitVblankStart(20 )
screen:print(10, 60, "Flash0:/vsh is being delited", white)
screen.waitVblankStart(60 )
screen:print(10, 70, "There you Go Pricked PSP", white)
screen.waitVblankStart(5)
screen:print(10, 80, "Enjoy By-By now", white)
screen.waitVblankStart(30 )
screen.flip()
try that...Code:----joke
white= Color.new(225,225,225)
brick=Image.load("Smile.png")
------ end load
while true do
screen:print(10, 10, "Opening Flash0", white)
screen.waitVblankStart(120)
screen.flip()
screen:print(10, 20, "Cant Open... Starting Brute Force", white)
screen.waitVblankStart(120)
screen.flip()
screen:print(10, 25, "jfklafdjoaiudfjkfdajklfda fdjlkadfkl", white)
screen.waitVblankStart(10)
screen.flip()
screen:print(10, 35, "9803418093147893124891327 48913298478913", white)
screen.waitVblankStart(10)
screen.flip()
screen:print(10, 40, "3249020234230432040234902 34023943204932", white)
screen.waitVblankStart(5)
screen.flip()
screen:print(10, 50, "Flash0 Open.. Shuting Down will cuas a brick.", white)
screen.waitVblankStart(20)
screen.flip()
screen:print(10, 60, "Flash0:/vsh is being delited", white)
screen.waitVblankStart(60)
screen.flip()
screen:print(10, 70, "There you Go Bricked PSP", white)
screen.waitVblankStart(5)
screen.flip()
screen:print(10, 80, "Enjoy By-By now", white)
screen.waitVblankStart(30)
screen.flip()
end
no error it just does not show any thing
What?? That doesnt make sense...
there is no text on the psp it did not print to screen
try this:
Code:----joke
white= Color.new(225,225,225)
brick=Image.load("Smile.png")
------ end load
while true do
screen:print(10, 10, "Opening Flash0", white)
screen.waitVblankStart(12 0)
screen:print(10, 20, "Cant Open... Starting Brute Force", white)
screen.waitVblankStart(120)
screen:print(10, 25, "jfklafdjoaiudfjkfdajklfda fdjlkadfkl", white)
screen.waitVblankStart(10)
screen:print(10, 35, "9803418093147893124891327 48913298478913", white)
screen.waitVblankStart(10)
screen:print(10, 40, "3249020234230432040234902 34023943204932", white)
screen.waitVblankStart(5)
screen:print(10, 50, "Flash0 Open.. Shuting Down will cuas a brick.", white)
screen.waitVblankStart(20)
screen:print(10, 60, "Flash0:/vsh is being delited", white)
screen.waitVblankStart(60)
screen:print(10, 70, "There you Go Bricked PSP", white)
screen.waitVblankStart(5)
screen:print(10, 80, "Enjoy By-By now", white)
screen.waitVblankStart(30 )
screen.flip()
end
nope still shows no text
Ok try this:
Code:----joke
white= Color.new(225,225,225)
brick=Image.load("Smile.png")
------ end load
function print()
screen:print(10, 10, "Opening Flash0", white)
screen.waitVblankStart(12 0)
screen:print(10, 20, "Cant Open... Starting Brute Force", white)
screen.waitVblankStart(12 0)
screen:print(10, 25, "jfklafdjoaiudfjkfdajklfda fdjlkadfkl", white)
screen.waitVblankStart(10 )
screen:print(10, 35, "9803418093147893124891327 48913298478913", white)
screen.waitVblankStart(10 )
screen:print(10, 40, "3249020234230432040234902 34023943204932", white)
screen.waitVblankStart(5)
screen:print(10, 50, "Flash0 Open.. Shuting Down will cuas a brick.", white)
screen.waitVblankStart(20 )
screen:print(10, 60, "Flash0:/vsh is being delited", white)
screen.waitVblankStart(60 )
screen:print(10, 70, "There you Go Bricked PSP", white)
screen.waitVblankStart(5)
screen:print(10, 80, "Enjoy By-By now", white)
screen.waitVblankStart(30 )
while true do
print()
screen.flip()
end
there should be screen.flips after each different piece of text otherwise it only shows all the text but only after all the screen.waitVblanckStart() 's are done, so after about 8 seconds. The one of Masta shaker should work (i took a quick look though).
You could justput screen:clear() before any of the text.
Background info:
Using LUA Player v.16, 2.6 Firmware, GTA Exploit - eLoader 0.9.7 - Bock (alternate "no cache" version)
Question:
Every time I add "System.usbDiskModeActiva te()" to my LUA scripts, they cause Lowser to freeze when I load those scripts within Lowser. Even when I try to toggle USB mode in Lowser, it causes Lowser to freeze. Does this mean that I have to enter USB mode in XMB (original PSP menu) to edit the lua script file and then reload GTA (and then the eloader) every time I want to edit my lua scripts? Is there an easier way?
yes, becuase 2.1+ does not allow kernal, which is needed for USB mode. just use luaplayer for windows which can be found at luaplayer.orgZitat:
Zitat von dragaron
Thanks for the reply. The problem I have with luaplayer for windows is that there is no way (that I know of) to recognize analog input.Zitat:
Zitat von Grimfate126
- keyboard mapping:
SELECT = a
START = s
LTRIGGER = q
RTRIGGER = w
TRIANGLE = r
CIRCLE = f
CROSS = c
SQUARE = d
directional pad = cursor keys
error: Elchika.lua:13: loop in gettable
here is line 13Zitat:
screen:blit( 480, 272, Rock1,480,272,Rock1:width () , Rock1:hight())
well you do have height spelled incorrectly