Posted 12 February 2013 - 10:39 AM
i are trying to end a loop with y or Y.
the bit of the code i that are not ending:
local xp1 = "y"
local xp2 = "y"
local stuff1 = read()
if stuff1 == "tw" then
while xp1 == "y" or "Y" do
rsToggle() – a function longer upp in the code
print("water toggled")
print(" toggle again? (Y/N)")
xp1 = read()
end –here
elseif stuff1 == "xp" then
while xp2 == "y" "Y" do
xpFarm() – a function
xp2 = read()
end –and here
end
edit: how do you use code tags?
the bit of the code i that are not ending:
local xp1 = "y"
local xp2 = "y"
local stuff1 = read()
if stuff1 == "tw" then
while xp1 == "y" or "Y" do
rsToggle() – a function longer upp in the code
print("water toggled")
print(" toggle again? (Y/N)")
xp1 = read()
end –here
elseif stuff1 == "xp" then
while xp2 == "y" "Y" do
xpFarm() – a function
xp2 = read()
end –and here
end
edit: how do you use code tags?