yeah like the char of a prx and how exaclty to find that out
Printable View
yeah like the char of a prx and how exaclty to find that out
Ok lets say I want to get get the char of this:
I would open up that prx in Word and go to Tools> word count and see Characters with spaces. It would give me 18. And I would put this:Code:fgsdfgsdfgf ddfhgj
Then I want prxvalue to equal, these three characters:Code:prxvalue = string.sub(file:read(18),x ,y)
I would highlight:Code:fgsdfgsdfgf ddfhgj
And go to word count again and see Characters with spaces and it would show 14 then add 1 to that makes it 15.Code:fgsdfgsdfgf ddfhgj
Then I would put:
Now I would highlight:Code:prxvalue = string.sub(file:read(18),15,y)
I would go to word count and see Characters with spaces and it would show 1. then I would take the that (1) and subract it from the total (18). That equals 17. So I would do:Code:fgsdfgsdfgf ddfhgj
And now prxvalue is actually equal to:Code:prxvalue = string.sub(file:read(18),15,17)
-= Double Post =-Code:prxvalue = "fhg" -- dont add that anywhere jus to show you what it equals now
When I put highlight I made it bold the bold is really hard to seee but it is there.
quick and easy question: there are a lot of ways to do hello world in lua right?
one of they ways of doing that is this:
print:("hello world")
or something like that
would that pput hello world on the screen?
no just:
Code:print("hello world")
Ya right like that
you would first have to create a color likeZitat:
Zitat von michaelp
then addCode:white = Color.new(255,255,255)
and put your code thenCode:while true do
-= Double Post =-Code:screen.flip()
screen.waitVblankStart()
end
oh yeah
Code:white = Color.new(255,255,255)
function print(x,y,inputString)
return screen:print(x,y,inputString,white)
end
while true do
screen:clear()
print(10,10,"hello")
screen.flip()
end
can any one tell me why this isn't working?
background = Image.load("background.pn g")
screen:blit(480,272,backr ound)
print(tostring(System.pow erGetBatteryLifePercent() ) .. " %Alcohol")
screen:flip()
while true do
pad = Controls.read()
if pad:cross() then
break
end
end
edit: ignore the spaces in weird places i think the forum did that for some reason
^ I think thats wrong print cant have the x,y parameters.
It may be right your trying to change screen:print not trying to printCenteredText
yesZitat:
Zitat von michaelp
this will print text into command line consoleZitat:
Zitat von michaelp
Zitat:
Zitat von psphackman
try thatCode:background = Image.load("background.pn g")
while true do
screen:blit(0,0,background)
screen:print(0,0,System.powerGetBatteryLifePercent().. " %Alcohol",Color.new(255,255,255))
pad = Controls.read()
if pad:cross() then
break
end
screen.waitVblankStart()
screen:flip()
end
ok
I din't mean that one to you, but I fixed you its above your post
-= Double Post =-
Wait I just edited it
Zitat:
Zitat von psphackman
try thisCode:background = Image.load("background.png")
while true do
screen:blit(0,0,background)
screen:print(5,5,System.powerGetBatteryLifePercent() .. " %Alcohol")
pad = Controls.read()
if pad:cross() then
break
end
screen.waitVblankStart()
screen.flip()
end
I just gave him that! :/
*ahem* debug console.Zitat:
Zitat von myschoo
i don't think it worked the battery info keep repeating like this 100%
100%....
and the pic didn't load
No you didnt. You told him to use the print command with a syntax similar to the Image.print function.Zitat:
Zitat von pspfreak9
try minee again I edited it
-= Double Post =-
Youresam: No I edited that before myschoo posted.
lies!Zitat:
Zitat von pspfreak9
I jsut edited again to stop the reapeating 100%.
-= Double Post =-
What your lieing :pZitat:
Zitat von youresam
freak: at first you even blitted BG outside the screen :P (480,272)
jk
:ROFL: :ROFL: :ROFL: :ROFL: :ROFL: :ROFL: :ROFL: :ROFL: :ROFL: :ROFL: :ROFL: :ROFL:Zitat:
Zitat von myschoo
(btw its 479,271)
I know I moved his blit over into the loop then cahnged to 0,0 when I saw that.
lol thanks guys (second day practicing lua)
no a VERY important question. what game should i make as my first one
like what is/was the easiest for you?
You should probably pratice with something easy that contain a collision function to get the feel for that
Anyone wanna help me test my game?
What is it ... I give it a tryZitat:
Zitat von pspfreak9
Anyone else... You have to have cools luaplayer mod
I'll take a look at it if you want.Zitat:
Zitat von pspfreak9
look or a test? A look at it is fine too. :)
I have no problem testing it, pm me with the link and give me a couple of hours and I'll get back to you with my initial impressions. We'll go from there.Zitat:
Zitat von pspfreak9
It is a online game so i'll PM you the link and go to flash chat so we can test it.
Zitat:
Zitat von pspfreak9
WOW man thx it really helps!:)
but i got an error... it says "then expected near newstring"
will someone PM me a basic menu please
ai - Try adding a space inbetween then and --.
pspfreak - you dont unassign flash0: for read-write privealges. When assigning any device in Lua, read-write privealges are given to you. By default, flash0 is inread-only mode, so you need to unassign, than reassign it to be able to write to it.
pspgamer - PMing answers helps no one but yourself. Im sure others would like a basic menu code. Ill write one up real quick...
actualy i already deleted that "--and......"
hmm what would be the problem...
I know, i forgot to add assign after unassigning (hey I wrote it up really quick :p )Zitat:
Zitat von SG57
Zitat:
Zitat von PSPgamer512
i think there is in lua scripts and snippets section