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:
parent
ba05138427
commit
c2917c24cf
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user