find . -name '*.lua' -exec dos2unix {} \;
find . -name '*.txt' -exec dos2unix {} \;
find . -name '*.lua' -exec sed -i 's/\xEF\xBB\xBF//' {} \;
find . -name '*.txt' -exec sed -i 's/\xEF\xBB\xBF//' {} \;
2017-03-05 20:16:33: ACTION[Server]: digs default:dirt_with_grass at (76,5,-17)
2017-03-05 20:16:33: ERROR[Main]: ServerError: Lua: Runtime error from mod 'xpanes' in callback luaentity_Step(): invalid key to 'next'
2017-03-05 20:16:33: ERROR[Main]: stack traceback:
2017-03-05 20:16:33: ERROR[Main]: [C]: in function '(for generator)'
2017-03-05 20:16:33: ERROR[Main]: ...etest/mods/staging-aliveai-modpack/aliveai/items.lua:545: in function 'crafting'
2017-03-05 20:16:33: ERROR[Main]: ...etest/mods/staging-aliveai-modpack/aliveai/items.lua:8: in function 'crafttools'
2017-03-05 20:16:33: ERROR[Main]: ...etest/mods/staging-aliveai-modpack/aliveai/items.lua:197: in function 'invadd'
2017-03-05 20:16:33: ERROR[Main]: ...etest/mods/staging-aliveai-modpack/aliveai/items.lua:351: in function 'dig'
2017-03-05 20:16:33: ERROR[Main]: ...etest/mods/staging-aliveai-modpack/aliveai/event.lua:987: in function 'mine'
2017-03-05 20:16:33: ERROR[Main]: ...inetest/mods/staging-aliveai-modpack/aliveai/bot.lua:35: in function <...inetest/mods/staging-aliveai-modpack/aliveai/bot.lua:4>
jimy wrote:http://lua-users.org/lists/lua-l/2009-05/msg00389.html
for the error with items.lua:Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
invalid key to 'next' ... in function '(for generator)'
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
> As stated in the Lua reference manual, this means that during the
> iteration you are assigning to a key that didn't exist prior to the
> iteration. This was the case in Lua 5.0, however the error is not
> guaranteed to happen each and every time.
I compile minetest with liblua5.2 but the problem can still.
(When I replace all pairs() by ipairs() it works fine)
find . -name '*.lua' -exec sed -i ' s/ pairs/ ipairs/g' {} \;
2017-03-06 15:40:44: ERROR[Main]: ServerError: Lua: Runtime error from mod 'aliveai' in callback luaentity_Step(): ...netest/mods/staging-aliveai-modpack/aliveai/base.lua:498: bad argument #2 to 'random' (interval is empty)
2017-03-06 15:40:44: ERROR[Main]: stack traceback:
2017-03-06 15:40:44: ERROR[Main]: [C]: in function 'random'
2017-03-06 15:40:44: ERROR[Main]: ...netest/mods/staging-aliveai-modpack/aliveai/base.lua:498: in function 'rndwalk'
2017-03-06 15:40:44: ERROR[Main]: ...etest/mods/staging-aliveai-modpack/aliveai/event.lua:668: in function 'findspace'
2017-03-06 15:40:44: ERROR[Main]: ...inetest/mods/staging-aliveai-modpack/aliveai/bot.lua:39: in function <...inetest/mods/staging-aliveai-modpack/aliveai/bot.lua:4>
for i, v in pairs(self.inv) do
if minetest.registered_nodes[i] and minetest.registered_nodes[i].walkable then
-- collect items to remove
for i, v in pairs(list) do
local gr=aliveai.namecut(v,true)
if not relist[gr] then relist[gr]=0 end
relist[gr]=relist[gr]+1
end
-- check if list can be removed, or try to craft
local nothaveall=false
for i, v in pairs(relist) do
local newre=aliveai.namecut(i,true)
if string.find(newre,"group:",1)~=nil then
if self.need then i=aliveai.crafttoneed(self,newre,true) end
relist[i]=nil
relist[newre]=v
end
if not aliveai.invhave(self,i,v) then
local getc
if self.need then getc=aliveai.crafttoneed(self,i,false,v) end
if getc then aliveai.crafting(self,getc,norecraft,v) end
nothaveall=true
end
end
2017-03-07 08:34:45: ERROR[Main]: ServerError: Lua: Runtime error from mod 'aliveai_folk' in callback luaentity_Step(): ...etest/mods/staging-aliveai-modpack/aliveai/event.lua:643: bad argument #2 to 'random' (interval is empty)
2017-03-07 08:34:45: ERROR[Main]: stack traceback:
2017-03-07 08:34:45: ERROR[Main]: [C]: in function 'random'
2017-03-07 08:34:45: ERROR[Main]: ...etest/mods/staging-aliveai-modpack/aliveai/event.lua:643: in function 'fight'
2017-03-07 08:34:45: ERROR[Main]: ...inetest/mods/staging-aliveai-modpack/aliveai/bot.lua:21: in function <...inetest/mods/staging-aliveai-modpack/aliveai/bot.lua:4>
if r1==0 then r2=-0.3 end
if r2==0 then r2=0.3 end
if r2 <= r1 then r2=r1+0.1 end
ServerError: Lua: Runtime error from mod 'aliveai_threats' in callback luaentity_Step(): /home/****/.minetest/mods/aliveai/aliveai/items.lua:474: 'for' limit must be a number
2017-03-07 18:53:38: ERROR[Main]: stack traceback:
2017-03-07 18:53:38: ERROR[Main]: /home/****/.minetest/mods/aliveai/aliveai/items.lua:474: in function 'eat'
2017-03-07 18:53:38: ERROR[Main]: /home/****/.minetest/mods/aliveai/aliveai/items.lua:171: in function 'invadd'
2017-03-07 18:53:38: ERROR[Main]: /home/****/.minetest/mods/aliveai/aliveai/items.lua:712: in function 'pickup'
2017-03-07 18:53:38: ERROR[Main]: /home/****/.minetest/mods/aliveai/aliveai/bot.lua:29: in function </home/****/.minetest/mods/aliveai/aliveai/bot.lua:4>
2017-03-07 18:53:38: ACTION[Server]: singleplayer leaves game. List of players:
AiTechEye wrote:i replaced a lot of math.random, where it could be error, to aliveai.random, that will check for errors
and checked all for loops, if someone could mess up
try if it works better now
https://forum.minetest.net/download/file.php?mode=view&id=9446
Users browsing this forum: No registered users and 81 guests