[00:00:50]: [string "scripts/prefabs/weed_plants.lua"]:116: bad argument #1 to 'random' (interval is empty) LUA ERROR stack traceback: =[C]:-1 in (field) random (C) <-1--1> scripts/prefabs/weed_plants.lua:116 in (upvalue) PlayStageAnim (Lua) <113-124> inst = 120066 - weed_ivy (valid:false) anim = picked custom_pre = nil scripts/prefabs/weed_plants.lua:203 in (field) fn (Lua) <192-207> inst = 120066 - weed_ivy (valid:false) stage = 1 stage_data = table: 000000003A02CC30 scripts/components/growable.lua:179 in (method) SetStage (Lua) <171-181> self = OnLoad = function - ../mods/workshop-2484725102/scripts/upgrade_component.lua:151 growoffscreen = true StartGrowing = function - ../mods/workshop-1645013096/modmain.lua:1 usetimemultiplier = false pausereasons = table: 00000000A3834B40 magicgrowable = true stages = table: 000000003A02DE00 inst = 120066 - weed_ivy (valid:false) stage = 1 domagicgrowthfn = function - scripts/prefabs/weed_plants.lua:357 stage = 1
时间: 2024-03-11 13:46:07 浏览: 316
这是一段Lua错误信息的堆栈跟踪,说明在执行Lua脚本时发生了错误。根据堆栈跟踪信息可以看出,错误发生在“scripts/prefabs/weed_plants.lua”的第116行,具体错误信息是“bad argument #1 to 'random' (interval is empty)”。
这个错误提示意味着在调用random函数时,传入的参数不正确,导致随机区间为空。可能是在计算随机区间时出现了错误,或者是随机区间参数传递不正确导致的。需要检查代码,确认参数传递是否正确,以及随机区间的计算是否正确。可以在代码中添加一些调试信息,以便更好地定位问题所在。
阅读全文