45 posts
Location
IA, USA
Posted 28 April 2015 - 09:57 PM
function fuel()
for i = 3, 16 do
turtle.select(1)
icnt = turtle.getItemCount(1)
turtle.refuel(icnt - 1)
print(i)
end
end
function sapSlot()
turtle.select(2)
local data = turtle.getItemDetail(2)
if data.name == "minecraft:sapling" and data.damage == 2 then
icnt = turtle.getItemCount(2)
if icnt ~> 1 then
return true
else
print("Please Supply More Saplings")
while turtle.getItemCount(2) ~> 1 do
sleep(2)
end
end
else
error("No Saplings")
end
end
sapSlot()
fuel()
I get then expected on line 18
546 posts
Location
Wageningen, The Netherlands
Posted 28 April 2015 - 09:59 PM
~> isn't a valid operator, you should use => instead.
Edit: I meant >=
Edited on 28 April 2015 - 09:37 PM
45 posts
Location
IA, USA
Posted 28 April 2015 - 10:06 PM
would != work?
48 posts
Posted 28 April 2015 - 10:11 PM
would != work?
A not in Lua is ~=
1080 posts
Location
In the Matrix
Posted 28 April 2015 - 10:40 PM
~> isn't a valid operator, you should use => instead.
To correct you so that he doesn't try your suggestion and error. You need the > BEFORE the =
>= <= == ~= all have the = in the last spot.
Edit: I think I just :ph34r:/>'d Lyqyd…
Edited on 28 April 2015 - 08:44 PM
8543 posts
Posted 28 April 2015 - 10:41 PM
~> isn't a valid operator, you should use => instead.
That's still not valid, >= and <= are though. As are ==, ~=, <, and >.