7 posts
Location
France
Posted 09 September 2013 - 03:22 PM
Title: bios:337: [string "ecran"]:5: '<name>' expected
Hi guys today i just copy a program from a video ( [media]
http://youtu.be/yRg2GYrVUDU[/media] They show the program at 1.30min ) and when i want to run it, it says :
"bios:337: [string "ecran"]:5: '<name>' expected"
I have never write a program before then i don't know what is wrong. I probably missed something but i don't know what it is.
Here is the program :
http://pastebin.com/VrrVLJLJThanks for your help !
758 posts
Location
Budapest, Hungary
Posted 09 September 2013 - 04:14 PM
Decide if you want print to concatenate the arguments or if you want to do that yourself. I suggest doing it yourself:
print(x .. ":" .. y)
The concatenation operator consists of two dots, not a dot and a comma.
7 posts
Location
France
Posted 10 September 2013 - 08:33 AM
Thank you but now it says :
" bios:337: [string "ecran"]:72: 'end' expected
( to close 'function' at line 35)
I try to put an espace before function but it still stay this.
758 posts
Location
Budapest, Hungary
Posted 10 September 2013 - 09:52 AM
You miss an 'end' at line 38 which would close the IF. This is not Basic, this is Lua.
7 posts
Location
France
Posted 10 September 2013 - 10:00 AM
Okay i have an other same error but i fix it.
Now i run it and still an error :
>ecran
79:10
ecran:52: attempt to call nil
758 posts
Location
Budapest, Hungary
Posted 10 September 2013 - 10:06 AM
Line 31. I could have spotted that last time if I had put the code into Notepad++. Sorry.
7 posts
Location
France
Posted 10 September 2013 - 10:11 AM
I don't see what is wrong line 31 ?
758 posts
Location
Budapest, Hungary
Posted 10 September 2013 - 10:16 AM
Hmm… Somehow that IF moved to line 32 since last time. Anyways, around line 31 there is another IF without an 'end'.
7 posts
Location
France
Posted 10 September 2013 - 10:39 AM
When i add an end at line 32 it says bios:337:[string "ecran"]:35: '<eof>' expected
When there is 3 end it says there is a end too much but when there is 2 end you say one end is missing. So i don't know what is wrong.
758 posts
Location
Budapest, Hungary
Posted 10 September 2013 - 11:12 AM
That's because you didn't add the end at line 32 but at line 27 or so.
http://pastebin.com/gQUmgmyJ
7 posts
Location
France
Posted 10 September 2013 - 11:16 AM
Still the same error with your pastebin :
>ecran
123:51 attempt to call nil
758 posts
Location
Budapest, Hungary
Posted 10 September 2013 - 11:49 AM
That's not the same. That's your typo, writing setCursorPos as setCurorPos.
7 posts
Location
France
Posted 10 September 2013 - 12:36 PM
Thank you so much that is beautiful now !