私が使用している関数では'end' expected (to close 'if' at line 11) near 'until'
エラーが出ますが、チェックしたところで'end'
が見つかりませんでしたプログラム全体また、私はLua 'end'が('11行目の 'if'を11行目で閉じる) 'まで'
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
あなたの 'if'に' then'がありません。 – daurnimator
@daurnimatorその更新を忘れた – IcecreamSwirlys