Open wrightmat opened 9 years ago
I would try with "room_overlay:fill_color({0, 0, 0})", with the parentheses, instead of "room_overlay:fill_color{0, 0, 0}", to rule out a possible syntax error.
Parentheses are optional when there is a single argument of type table or string. This is a real bug.
Does it work if you disable video acceleration? solarus_run -video-acceleration=no path/to/your/game (or from the preferences of the quest editor)
It does not - I still have a fatal crash. Of note, I have several other (working) surfaces that use the same syntax. The only difference (I think) in this case is that I'm reusing the same overlay variable in a loop.
Error throws with the following code, the exact line referenced is room_overlay:fill_color. No further details on error, but I thought it might have something to do with overwriting room_overlay?
for i = 1, #rooms do if game:get_value("dungeon_8_room"..i.."_lit") then if room_overlay then room_overlay = nil end room_overlay = sol.surface.create("entities/dark_room.png") room_overlay:draw_region(rooms[i].x, rooms[i].y, 328, 262, dst_surface) else if room_overlay then room_overlay = nil end room_overlay = sol.surface.create(328,262) room_overlay:fill_color{0, 0, 0} room_overlay:set_opacity(0.9 * 255) room_overlay:draw_region(rooms[i].x, rooms[i].y, 328, 262, dst_surface) end end