1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-12 10:04:40 +02:00

error on missing surface

This commit is contained in:
grilledham 2019-07-03 15:54:19 +01:00
parent ba05138427
commit c2917c24cf

View File

@ -389,6 +389,10 @@ function Public.start_game(surface, top_left_position, size, update_rate, max_fo
error('Snake game is already running you must end the game first.', 2)
end
if not surface then
error('Surface must be set.', 2)
end
new_game(surface, top_left_position, size, update_rate or board.update_rate, max_food or board.max_food)
end