10 posts
Posted 25 July 2013 - 01:28 AM
The computercraft is show an error:
test.lua:13: attempt to index ? (a nil value)
At line 13:
local obj1 = gameutils.loadSprite(
shell.resolve(".").."/obj1.nfp", 4, 4)
Please help!
1688 posts
Location
'MURICA
Posted 25 July 2013 - 02:02 AM
Could be a number of things.
1. Did you load the "gameutils" API?
2. Do you have a variable named "shell"?
3. Does the file actually exist and is being referenced correctly?
10 posts
Posted 25 July 2013 - 02:07 AM
Could be a number of things.
1. Did you load the "gameutils" API?
2. Do you have a variable named "shell"?
3. Does the file actually exist and is being referenced correctly?
1.Yes i loaded
2.The shell.resolve is not a default command?
3.Yes the file is exist
1688 posts
Location
'MURICA
Posted 25 July 2013 - 02:48 AM
shell.resolve is default. It's just that, if you name one of your variables "shell", the entire shell API becomes unusable.
local shell = nil
shell.run('edit') --> attempt to index a nil value
What your error means is that you're trying to call a function from an API that doesn't exist, at least not inside your script.
10 posts
Posted 25 July 2013 - 04:53 AM
shell.resolve is default. It's just that, if you name one of your variables "shell", the entire shell API becomes unusable.
local shell = nil
shell.run('edit') --> attempt to index a nil value
What your error means is that you're trying to call a function from an API that doesn't exist, at least not inside your script.
The API (GameUtils) is worked perfect because i maked other things with gameutils.
159 posts
Location
A Chair
Posted 25 July 2013 - 07:16 AM
could you post the entire code of test.lua please, or at least up to line 14 of your code.
As the error could be before this line and we cannot diagnose from just the line and error, we can only hazzard guesses :)/>