Kullanmakta olduğum bir işlev, çalıştırdığımda bana 'end' expected (to close 'if' at line 11) near 'until'
hatasını veriyor, ancak ben kontrol ettim ve bir 'end'
eksik tüm program. Ayrıca, ben iade veya bunun gibi diğer bazı komutu (farkında olduğumu)Lua 'end' beklenen (close to 'line') 'kadar' yakın '
function sell_item(item, soldfor)
items_found = 0
for i, v in pairs(inv) do
if v == item then
items_found = items_found + 1
end
end
if items_found ~= 0 then
items_destroyed = 0
until items_destroyed == 1 do
for i, v in pairs(inv) do
if v == item then
pop_inv(item)
items_destroyed = 1
io.write(item .. " sold for " .. soldfor .. " coins")
count = 0
while count ~= soldfor do
table.insert(money, "coin")
count = count + 1
end
count = 0
end
end
items_destroyed = 0
end
elseif items_found == 0 then
io.write("You do not have this item")
end
end
'' '' '' '' '' eksik. – daurnimator
@daurnimator Bu güncellemeyi unuttuysanız – IcecreamSwirlys