[0.17.34] in events.on_player_setup_blueprint: player.cursor_stack.valid==true, but it's a lie!
Posted: Thu May 02, 2019 1:39 pm
Step 1:
Step 2: Make a blueprint.
Step 3: Enjoy your crash.
What I expect: If I check if something is valid then it should be safe to use immediately after if I don't modify anything. I don't expect a crash when I write valid code
Code: Select all
/c
script.on_event(defines.events.on_player_setup_blueprint, function(event)
local cs = game.players[event.player_index].cursor_stack
if cs.valid then
game.print(cs.name)
end
end)
Step 3: Enjoy your crash.
What I expect: If I check if something is valid then it should be safe to use immediately after if I don't modify anything. I don't expect a crash when I write valid code
