I found that 2 triangles rotates the image at the corner rather than the center. Is it just the way I drew the triangles that gives me that glitch? Also how do you draw rectangles in lua?Zitat:
Zitat von eyece
Printable View
I found that 2 triangles rotates the image at the corner rather than the center. Is it just the way I drew the triangles that gives me that glitch? Also how do you draw rectangles in lua?Zitat:
Zitat von eyece
its how to have positioned the texture, it should be in the center.
(middleOfSquare - (widthOfTexture / 2)) basically
Can someone tell me what the exact .WAV audio support is for LUA?
Seeing as I haven't even looked at the GU yet, I'm not even sure how I would convert my current tile drawing routines to use it. On the other hand, If i could use the GU to blit a rotated image to the screen and then use a screen capture function to save it as a regular 2d image in my tile array, then that should be pretty easy to combine with what I already have
Can u open up a prx in lua and change a specific part of the code?
right guys another day, another question. Im still not sure if im doing the right thing. Right im using scanf to remember the letters that i enter but here's my problem when scaning for an integer you just do int NAME OF VARIABLE;
what would you enter for a string ?
thx for the help, but how can you define wher it's need to be copied?Zitat:
Zitat von Merick
Just put in the name of the folder where you want it to go:
"./folder name/filename.ext"
y doesnt this work?....it doesnt write to the file, or print it
here is my code
Code:irsignal = nil
System.irdaInit()
while true do
pad = Controls.read()
screen:clear()
if irsignal == nil then
irsignal = System.irdaRead()
end
if irsignal ~= nil then
screen:print(10, 10, irsignal)
end
if pad:cross() then
copiedfile = io.open("remote.txt", "w")
copiedfile:write(irsignal)
copiedfile:close()
end
screen.flip()
end
I don't really know anything about using the irda, but are you sure that you've got the sensor lined up properly with whatever device you're trying to read from?
yes im positive.....idk why its not workingZitat:
Zitat von Merick
its because if there is no signal then it doesn't return null. I don't know what it returns but its not null. what you need to do is scan the port before the loop, use that as a base reference, then if the new read ~= base, print to screen. Also I beleive the info gets sent in pulses so you might want to put your write to file function in the print irsignal portion of you code. I tested this all out and it works, heres my code.Zitat:
Zitat von the undead
Code:white = Color.new(255,255,255)
function writesignal(s)
file = io.open("remote.txt", "w")
file:write(s," ")
file:close()
end
System.irdaInit()
base = System.irdaRead()
while true do
screen:clear()
irsignal = System.irdaRead()
if irsignal ~= base then
screen:print(10, 10, irsignal, white)
writesignal(irsignal)
else
screen:print(10, 10, "No Signal", white)
end
pad = Controls.read()
if pad:cross() then
end
if pad:start() then
while pad:start() do
pad = Controls.read()
end
break
end
screen.waitVblankStart(1)
screen.flip()
end
ok ill try it, tanks
-= Double Post =-
it worked but it says remote.txt is a corrupt file
-= Double Post =-
nvm i fixedit by myself
thx, but i already tried this
when i do that, i get an errorZitat:
file = io.open("test.txt","r")
filecopy = file:read("*a")
file:close()
copiedfile = io.open("./psp/test.txt", "w")
copiedfile:write(filecopy )
copiedfile:close()
any idea?Zitat:
attempt to index global 'copiedfile' (a niv value)
it means thatZitat:
attempt to index global 'copiedfile' (a niv value)
doesnt exist...Zitat:
"./psp/test.txt"
try something like:
or whatever..Zitat:
"ms0:/PSP/GAME/test.txt"
hi i copied the 2nd code for the sample menu from the bronx's thread but i get error:
C:\Documents and Settings\hidden\Desktop\l uaplayerwindows>luaplayer Index.lua
error: Index.lua:51: 'then' expected near '='
C:\Documents and Settings\hidden\Desktop\l uaplayerwindows>pause
Press any key to continue . . .
yeah theres little mistake...Zitat:
Zitat von ai3gtmc
should beCode:if menustatus => 4 then
menustatus = 1
end
Code:if menustatus >= 4 then
menustatus = 1
end
is there any way to read an rss feed through lua?
I'm using that code for copieing files al well, but is it not possible to write to flash0 or somthing??I use
and all a get is a nil val...Zitat:
copiedfile = io.open("flash1:/vsh/resource/doc.ext", "w")
copiedfile:write(filecopy )
copiedfile:close()
If SystemUsbDiskModeActivate () activates usb in lua, how would you deactivate it?
gameo:
lucifer v:Zitat:
System.UsbDiskModeDeactiv ate()
im not sure if you can write to flash with lua
but you can read from it?
so, i tested it and... you CAN write to flash1:/ but not into flash0:/
is there any way to access an rss feed with netlib or lua, just read the contents of it
thx for testing, but its the flash0 that i need.Is it possible that in the future...?Zitat:
Zitat von myschoo
i think the problem is not in the LUA itself, but in the LUA Player which is blocking access into flash0 writing
ahnn owkey, thx for your help;)
maby whit a upgrade in furture, let's hope
i don't know if they will though, too many people will brick their psp's lol
I have a modified version of Lua that can write to the flash0. It's really easy to do. But if I released it, we would have hundreds of bricked PSPs. That's why it will probably never be implemented. I would learn C if you want to write to the flash0.
Yeah, I'd prefer that they not do it. Why make it easier for some jerk to create trojans to deliberately brick the psp's of unsuspecting hombrew users?
does anyone know why on the windows luaplayer, my music/sound effects play fine, yet on my PSP things will get messed up sometimes.
example, on my computer there is a coin sound when you press up or down in the menu, and on my PSP the coin sound will play like five times instead of once.
Your computer has more RAM and CPU than a PSP.
Hey, i don't know if this question has been asked before but how much ram is there to allocate to sample loading,
As in how many megs of files can i load before i get
Code:Luaplayer's mikmod has a critical error:
_mm_critical 0
_mm_errno 5
Sample load failed - out of memory
Its because of the constantly repeating loops in your program. An example of how to fix this would beZitat:
Zitat von emericaska8r
This is all in your main loop.Code:pad = controls.read()
oldpad = controls.read()
if pad:up() and oldpad:up() != pad:up() then
Insert your code to play the coin sound
oldpad = pad
end
If you excel in C++ then you could change it write now by changing the source code of luaplayer.Zitat:
Zitat von lucifer_v
And mannymix I don't think it is possible to read an rss feed.
Zitat:
Zitat von myschoo
i got it to work but where i the selector?
Using sysext lib, is it possible to actually LAUNCH a UMD, or just browse?
dude, i suggest you to make your own menu, its quiet easy... ;)Zitat:
Zitat von ai3gtmc
help me please
im porting my The Good News Bible to LUA:Jump:
help me
but I don't:(Zitat:
If you excel in C++ then you could change it write now by changing the source code of luaplayer.
can someone send it please?
I looked at SBA and Drag mini's source and where it has this part:
But there is no netget how would it get the data. If I edit the example with no netget didn't work why would that work in those two games?Code:netrecv()
buffer = netvalue("yourgame_room"..room_number)
buffer2 = {}
if buffer ~= "" then
buffer2 = explode(buffer,":")
if table.getn(buffer2) == 4 then
cmph = tonumber(buffer2[1])
cgear = tonumber(buffer2[2])
cpos = tonumber(buffer2[3])
cvpos = tonumber(buffer2[4])
end
end