[0.15.37] raise_event crashes game with unexpected error

This subforum contains all the issues which we already resolved.
Post Reply
Bilka
Factorio Staff
Factorio Staff
Posts: 3129
Joined: Sat Aug 13, 2016 9:20 am
Contact:

[0.15.37] raise_event crashes game with unexpected error

Post by Bilka »

To reproduce:

1. Install attached mod
2. Start sandbox game, accept cheat mod + tech (also works in freeplay game, but this way is easier)
3. Place a portal using the portal gun
4. Do /c script.raise_event(defines.events.on_entity_died, game.player.selected) while having the portal selected
5. Unexpected error occurs
Attachments
factorio-current.log
(19.69 KiB) Downloaded 132 times
Portals_0.2.8.zip
(547.35 KiB) Downloaded 128 times
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: [0.15.37] raise_event crashes game with unexpected error

Post by Oxyd »

Thanks, fixed in 0.16.

The problem is you're passing a LuaEntity as the second parameter to raise_event, which expects a table (and the game doesn't properly differentiate between the two, so it crashes). The correct command would be /c script.raise_event(defines.events.on_entity_died, {entity=game.player.selected}).

Bilka
Factorio Staff
Factorio Staff
Posts: 3129
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [0.15.37] raise_event crashes game with unexpected error

Post by Bilka »

I feel dumb now, but thanks for "fixing" this.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Post Reply

Return to “Resolved Problems and Bugs”