Page 1 of 1

[16.X] Scenario do not work anymore

Posted: Sat Jan 13, 2018 3:48 pm
by IIPoliII
Hello guys,
I had take a scenario from a website for my 15.40 old server but now that i try to play it on 16.7 it don't work anymore,
and if i roll back to 15.X it works here is the error i get
Image
My (or the guy) scenario is in attachement
Could you help thanks :)
Poli

Re: [16.X] Scenario do not work anymore

Posted: Sat Jan 13, 2018 8:06 pm
by orzelek
This scenario is using RSO code in it by copy/paste. Since mod works without problems my guess would be that it has been somehow modified or contains obsolete version of code.
I do hope that there is an information attached to scenario that it uses RSO and description of changes made to it to comply with mod license.

Re: [16.X] Scenario do not work anymore

Posted: Sat Jan 13, 2018 9:23 pm
by Rseding91
The scenario script is calling math.random() and not using the result - which is a pointless operation because calling it doesn't do anything if you don't use the result.

I changed the mod API so in 0.16 and later specific API functions that are only useful if you use the return result will error if the game detects that the result is going unused.

Like calling surface.find_entities_filtered() and then doing nothing with the found entities - it's dead code.