No. What do i put in the "string" part?
Printable View
No. What do i put in the "string" part?
wow, the only thing i would suggest is try it on your psp too (if you are testing it with the windows luaplayer). The problem may be that the current luaplayer version for windows does not support fonts or something. dunno, i'll test it out in a second
-= Double Post =-
yay it still doesn't work :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh: :Argh:
I got it to work. The problem is. I don't know how. Send me your code emericaska8r. I might be able to find out how it's different from mine.
ok heres the code that wont work:
It says that attempt to perform arithmetic on field 'x' (a nil value)Code:Pic = { }
Pic[1] = { x= 80, y = 95, height = pic1:height(), width = pic1:width() }
Player = { }
Player[1] = { x = 50, y = 107 }
screenwidth = 480 - player:width()
screenheight = 272 - player:width()
function collisionCheck(Pic)
if (Player.x + playerWidth > Pic[1].x) and (Player.x < Pic[1].x + Pic[1].width) and (Player.y + playerHeight > Pic[1].y) and (Player.y < Pic[1].y + Pic[1].height) then
Player.x = oldx
Player.y = oldy
end
end
playerHeight = 90
playerWidth = 90
function movePlayer()
pad = Controls.read()
if pad:left() then
Player.x = Player.x - 1
end
if pad:right() then
Player.x = Player.x + 1
end
if pad:up() then
Player.y = Player.y - 1
end
if pad:down() then
Player.y = Player.y + 1
end
end
while true do
pad = Controls.read()
oldx = Player.x
oldy = Player.y
screen:clear()
collisionCheck(Pic[1])
i cant fix it can someone help?
you declare your array like this:Zitat:
Zitat von %chrono trigger%
Player[1];
so, you cant do this:
Player.x;
you have to do this:
Player[1].x
get my point?
well.....Zitat:
Zitat von Cheez Pirate
Zitat:
Zitat von BlackShark
Text always starts at the bottom-left for me. It seems like it does for Tai-Mai-Shu, too.Zitat:
Zitat von Cheez Pirate
Yes it does.:tup:Zitat:
Zitat von Aphonia
Yup, and I figured out the same thing. ;) And it starts to get real confusing after a while. Trying to line up the with the printed font when you press up or down... Jeez.
Can someone plz work with me on the tab reader for guitarhelper? Im having trouble making it work. i need scrolling and reading all the lines from a text file. if someone can help me then plz add me
[email protected]
my messanger is compatible with msn messanger also.
or reply to this.
When ever i try to run this i get an error that says trying to index global 'file' a nil value
here is my code
http://img249.imageshack.us/img249/3190/aaaaapy9.png
On line 176 you should have:
You always have a space before and after '..' or it won't work.Code:file = io.open(name .. ".txt","r")
ok, thanks i never knew thatZitat:
Zitat von Cheez Pirate
You can have a space after the comma.
When i use file.io i always have a space after a comma.
hmm, now it says calling name a string value.... and it wont work....any idea?
I never said you can't have a space after a comma... lol...Zitat:
Zitat von Tai-Mai-Shu
-= Double Post =-
Show me your whole code. That isn't enough to debug it...
any one know how to fix this?Zitat:
Zitat von the undead
Edit- Ok hold on
Spoiler for Code:
I don't know if this will help but shouldn't
be:Code:wordread = file:read()
Code:wordread = word1:read()
ill try thatZitat:
Zitat von Cheez Pirate
-= Double Post =-
now it says attempt to index global 'word1'<a nil value>
Because your calling 'name', an io.open function, in another io.open function, being 'word1'.
Now I'll need to know what your going to use 'name' for and what your going to use 'word1' for.
name is to find the correct file and word1 is to open that fileZitat:
Zitat von Cheez Pirate
oh and if u do figure this out i appreciate it, ive been looking at this for an hour trying to figure out whats wrong and stuff
Confusing.
Explain to me what this whole line does. In order. It should help me understand it.Code:word1 = io.open(name .. ".txt", "r")
ok word1 is a new variable i called to open up the file, now name is a variable already stated. so its saying open up the variable(it is a string) name.txt and read itZitat:
Zitat von Cheez Pirate
So do you have a file called "name.txt" in the same folder as your index.lua? Or whatever you named it.
i have a file named Acid.txt when i type Acid on the psp that is what name equals. so when i say word1 = io.open(name..".txt", "r") it should be the same as word1 = io.open("Acid.txt", "r")Zitat:
Zitat von Cheez Pirate
But name opens a flash1 file. Does the flash1 file contain the word "acid?"
ur right i didnt notice that ill fix it then try itZitat:
Zitat von Cheez Pirate
-= Double Post =-
I tried it and i still get word1 is a nil value...
And what did you replace the flash1 file with? The whole line.
i just renamed the variable to nname
Hmm. Well I dunno where in the registry that your going to find the word 'acid.'
im not looking in the registry, when you type it on the psp name =s what u typed, i have a onscreen keybord so when i type acid that is wat name equals, imtrying to open a file called acid because that is what i typed...the first part of the code just shows your psps nick nameZitat:
Zitat von Cheez Pirate
Must be a nil value when it reads it... Are you sure that's the right line for your system's name?Code:name:seek("set",0x2380)
im not talking about that part.... it is no longerZitat:
Zitat von Cheez Pirate
its nowCode:name:seek("set",0x2380)
so their is no problem with that, im talking about my code closer to the bottom.Code:nname:seek("set",0x2380)
here is a summury of the code that im having a problem with
it says that word1 is a nil valueCode:name = " "
--onscreen keyboard code
if pad:start() then
blah
blah blah
word1 = io.open(name .. ".txt", "r")
wordread = word1:read()
word:close()
1. Is there numbers or letters in acid.txt?
2. Is there a value named 'name' that stores the text you print? If there is. What is it?
1. no their is no numbersZitat:
Zitat von Cheez Pirate
2. yes, its called name, the text i print is acid
See what it does when you change it to. ("acid.txt","r")
why do u have
while true do
2x in ur script? o_O
edit. oh and btw i found problem with name reading ...
in 3.03 its on offset 2380 but i tested it on 3.10 and i didnt see my name, so probably the offset changes together with FW -_-
hmm, it works on my 3.03 oe c, but i just can figure out what is wrong with it
how to make internet browser from lua?? and wlan load and also memory stick load??
anybody bored and wanna try to work out the collision problems in my code?