[0.10.9] print = game.player.print (crashes on call)
Posted: Tue Sep 02, 2014 10:50 am
I should be playing the game, but I'm fooling around with Lua scripts again
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.
This works.
As a side note I was trying it in closure test and it did print "ModA tick: 0" and crashed after 300 ticks. (Closure test was overall successful after removing the print reference.)
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() )