[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: 1954
Joined: Sat Aug 13, 2016 9:20 am
Contact:

[0.15.37] raise_event crashes game with unexpected error

Post by Bilka » Tue Nov 21, 2017 10:48 am

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 34 times
Portals_0.2.8.zip
(547.35 KiB) Downloaded 35 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
Factorio Staff
Factorio Staff
Posts: 1245
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: [0.15.37] raise_event crashes game with unexpected error

Post by Oxyd » Tue Nov 21, 2017 12:48 pm

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: 1954
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [0.15.37] raise_event crashes game with unexpected error

Post by Bilka » Tue Nov 21, 2017 12:52 pm

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”

Who is online

Users browsing this forum: No registered users