[halp?] missing programs
Started by LuaEclipser, Mar 10 2013 03:37 AM
11 replies to this topic
#1
Posted 10 March 2013 - 03:37 AM
hello it has come to my attention that i am missing the
turtle.getFuelLevel() form turtle API
and the pastebin program
i am running computercraft 1.5
turtle.getFuelLevel() form turtle API
and the pastebin program
i am running computercraft 1.5
#2
Posted 10 March 2013 - 03:43 AM
turtle.getFuelLevel() isn't a program, go into the Lua interpreter to use it, or use the refuel program. The pastebin program is missing because you haven't enabled the HTTP API in your config file. Just change false to true next to the HTTP API option, it'll show up.
#3
Posted 10 March 2013 - 03:48 AM
turtle.getFuelLevel ... tried restarting the computer without startup scripts? you could have accidentally overridden it somewhere. so
print(turtle.getFuelLevel)displays nil?
#4
Posted 10 March 2013 - 04:36 AM
Test everything before posting a topic:
Basic knowledge goes a long way
print(turtle.getFuelLevel)
if not http then print("HTTP seems to be disabled") end
Basic knowledge goes a long way
#5
Posted 10 March 2013 - 04:42 AM
i tried all that
#6
Posted 10 March 2013 - 04:57 AM
If you tried it then you would have noticed that http was not enabled and or the fuel level was, well, the turtle's current fuel level. If it didn't return ANYTHING then you should reinstall ComputerCraft.
#7
Posted 11 March 2013 - 01:59 PM
and i uninstalled, and renstalled, and now i am missing paintutils draw Image. this is how i am using it;
i get error, paintutils :92: attempt to get lenght of nil
image = pauntutils.loadImage(".gui")
paintutils.drawImage(image,1,1)
i get error, paintutils :92: attempt to get lenght of nil
#8
Posted 11 March 2013 - 02:54 PM
LuaEclipser, on 11 March 2013 - 01:59 PM, said:
and i uninstalled, and renstalled, and now i am missing paintutils draw Image. this is how i am using it;
i get error, paintutils :92: attempt to get lenght of nil
image = pauntutils.loadImage(".gui")
paintutils.drawImage(image,1,1)
i get error, paintutils :92: attempt to get lenght of nil
#9
Posted 11 March 2013 - 03:04 PM
Try turtle.getFuelLevel() with the brackets
#10
Posted 11 March 2013 - 03:27 PM
Linearus, on 11 March 2013 - 03:04 PM, said:
Try turtle.getFuelLevel() with the brackets
print( turtle.getFuelLevel() ) -- this would print the fuel level print( turtle.getFuelLevel ) -- this would print "function: 3454345" or some such random numbersso doing 'turtle.getFuelLevel' without brackets can be a very useful tool to see if a function exists, since it would be nil. here is an example of a good usage of checking function pointers
if not term.isColor then print "You are using a pre-CC1.4 Computer" print "You cannot change colours" elseif term.isColor() then print "You are using an Advanced Computer" print "You can change colours to any of the 16" else print "You are using a Normal Computer in CC1.4+" print "You can change colours only between black and white" end
#11
Posted 13 March 2013 - 03:12 PM
i did
fel = turtle.getFuelLevel()
if fel < 1 then
print("No Fuel")
#12
Posted 13 March 2013 - 03:32 PM
So what did it output? "No fuel"? Or attempt to call nil?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











