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
2017-01-31 21:58:11: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'magic' in callback item_OnPlace(): ....minetest/games/redblokers/mods/magic/home_stone.lua:111: bad argument #2 to 'chat_send_player' (string expected, got no value)
2017-01-31 21:58:11: ERROR[Main]: stack traceback:
2017-01-31 21:58:11: ERROR[Main]: [C]: in function 'chat_send_player'
2017-01-31 21:58:11: ERROR[Main]: ....minetest/games/redblokers/mods/magic/home_stone.lua:111: in function 'warp'
2017-01-31 21:58:11: ERROR[Main]: ....minetest/games/redblokers/mods/magic/home_stone.lua:9: in function <....minetest/games/redblokers/mods/magic/home_stone.lua:7>
2017-01-31 21:58:11: ACTION[Server]: singleplayer leaves game. List of players:
My function is:
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
minetest.register_craftitem("magic:home_stone",{
description = "Home stone",
inventory_image = "home_stone.png",
on_place = function(itemstack, placer, pointed_thing)
minetest.chat_send_all(placer:get_player_name())
magic.warp(placer:get_player_name())
end,
})
Edit: Solution -> "I just found the error, chat_send_player needs two arguments and I only send one hahaha"