Turtle.getFuelLevel
From ComputerCraft Wiki
Revision as of 19:42, 5 September 2012 by 24.20.134.220 (Talk)
| Function turtle.getFuelLevel | |
| Syntax | turtle.getFuelLevel() |
| Returns | "unlimited" if disabled fuel, else the fuel level. |
| Part of | ComputerCraft |
| API | turtle |
| Description | Returns the fuel level. |
Examples
| Description | Fills the turtle with fuel if the fuel tank is empty |
| Code |
if turtle.getFuelLevel() < 1 turtle.refuel() end |
| Output | Checks if the fuel tank is empty, if it is, it will fill the tank, else it wont do anything. |