I get crash if I try to call "game.player.print"-method with variable that refers it directly. Not sure if it is only with print.
This crashes.
Code: Select all
print = game.player.print
print("test")
Code: Select all
gt = game.gettile
game.player.print( gt(0,0).name )
Code: Select all
require "defines"
function initOnTick()
local tick = 0
return function(event)
if event.tick >= tick then
game.player.print("ModA tick: ".. tick)
tick = event.tick + 300
end
end
end
game.onevent(defines.events.ontick, initOnTick() )