我的 lua 代码运行程序出现脚本错误,我不确定如何修复
My lua code runner is having a script error that im not sure how to fix
每当我尝试 运行 这段代码时,它会在名为“Creat Your Frisk”的应用程序中显示“脚本遇到错误”ecounter:(第 48 行,字符 3)'end' 预期'' 附近有人可以帮忙 me/explain 如何解决这个问题?
function HandleItem(ItemID)
if ItemID == "Cinnamon Bon" then
Player.Heal (10)
BattleDialogu ({"you regain 10 HP!"})
end
https://i.stack.imgur.com/APlSe.png
函数和if
语句块都由end
语句终止。
function HandleItem(ItemID)
if ItemID == "Cinnamon Bon" then
Player.Heal (10)
BattleDialogu ({"you regain 10 HP!"})
end
end
每当我尝试 运行 这段代码时,它会在名为“Creat Your Frisk”的应用程序中显示“脚本遇到错误”ecounter:(第 48 行,字符 3)'end' 预期'' 附近有人可以帮忙 me/explain 如何解决这个问题?
function HandleItem(ItemID)
if ItemID == "Cinnamon Bon" then
Player.Heal (10)
BattleDialogu ({"you regain 10 HP!"})
end
https://i.stack.imgur.com/APlSe.png
函数和if
语句块都由end
语句终止。
function HandleItem(ItemID)
if ItemID == "Cinnamon Bon" then
Player.Heal (10)
BattleDialogu ({"you regain 10 HP!"})
end
end