Streaming game development: https://www.twitch.tv/stabyourself Image

Fix for crash with triggered tiles in long levels

Mods, guides how to use and install mods go right in here.
TurretBot
User avatar
Posts: 4634
Joined: 15 Mar 2012, 23:18
Reputation: 713
Contact:

Post » 12 Dec 2014, 03:47

The error was being given from some variable that should exist but doesn't, so I just commented out that part of the code
I suppose that code was there for a reason so tell me if anything behaves weirdly

Download
Or if you prefer to do it yourself: Replace line 98, in animatedquad.lua with "if self.triggered and x and y and animatedtimers[x] and animatedtimers[x][y] then"


HugoBDesigner wrote:After a lot of investigation, I found out that, for some reason, it is trying to get an item of the table that doesn't really exists, so here's a quick fix:

if self.triggered and x and y and animatedtimers[x] and animatedtimers[x][y] then

Replace line 98 by this. It keeps the properties, but still needs testing though (even though it most likely fixes the bug as a whole).
For the lazy ones:

https://www.dropbox.com/s/f13hpan12ukvg ... d.lua?dl=0
Last edited by TurretBot on 15 Dec 2014, 17:13, edited 1 time in total.

FuriousHedgehog
User avatar
Posts: 780
Joined: 31 May 2014, 02:14
Reputation: 296
Contact:

Post » 12 Dec 2014, 04:13

TurretBot wrote:The error was being given from some variable that should exist but doesn't, so I just commented out that part of the code
I suppose that code was there for a reason so tell me if anything behaves weirdly

Download
Or if you prefer to do it yourself: comment out lines 98, 99, 100, and mm102 in animatedquad.lua

this lua is for
mari0 SE or alesan entities?

TurretBot
User avatar
Posts: 4634
Joined: 15 Mar 2012, 23:18
Reputation: 713
Contact:

Post » 12 Dec 2014, 04:16

Mari0: SE

FuriousHedgehog
User avatar
Posts: 780
Joined: 31 May 2014, 02:14
Reputation: 296
Contact:

Post » 12 Dec 2014, 06:10

TurretBot wrote:Mari0: SE

ok
thanks

HansAgain
User avatar
Posts: 1133
Joined: 03 Feb 2012, 18:51
Reputation: 265
Contact:

Post » 14 Dec 2014, 19:59

Thanks Turret, but i have found an inconvenient situation caused by your fix:
Image
Now the properties related portals doesn't change (just follow the first frame's property).
So, since the first frame of this animated tile isn't solid, when activated is solid but portals can pass throught it.

HugoBDesigner
User avatar
Posts: 2101
Joined: 19 Sep 2012, 02:23
Reputation: 662
Contact:

Post » 15 Dec 2014, 03:23

Turret, if you're gonna post a fix, make sure it fixes stuff.
Hans requested me to fix it. After a lot of investigation, I found out that, for some reason, it is trying to get an item of the table that doesn't really exists, so here's a quick fix:

if self.triggered and x and y and animatedtimers[x] and animatedtimers[x][y] then

Replace line 98 by this. It keeps the properties, but still needs testing though (even though it most likely fixes the bug as a whole).
For the lazy ones:

https://www.dropbox.com/s/f13hpan12ukvg ... d.lua?dl=0

Edit: No line should be commented. By the way, commenting doesn't fix anything; it just "masks" the error.

TurretBot
User avatar
Posts: 4634
Joined: 15 Mar 2012, 23:18
Reputation: 713
Contact:

Post » 15 Dec 2014, 17:33

HugoBDesigner wrote:Turret, if you're gonna post a fix, make sure it fixes stuff.

Well, it did fix it. Did it crash using my fix? No.
It's a fix, and it fixes things. It created a new problem as well. I didn't even expect what I did to work, but it did.
HugoBDesigner wrote:Hans requested me to fix it.

Wow, what a coincidence! He asked me as well!
And I would have asked you too, but I assumed you wouldn't know about SE from when I asked you about linking, so I didn't.
In fact, I assumed nobody on this forum could help with this. I'm the only one modding SE iirc.
HugoBDesigner wrote:Edit: No line should be commented. By the way, commenting doesn't fix anything; it just "masks" the error.

Yeah, I knew commenting it out wasn't the actual solution.
I knew more about the crash than I said because of what I said earlier: Even if I did say everything, I'm the only modder of SE. Nobody would know what to do anyway.
For example I knew the nil value was animatedtimers[x][y]. I don't know how to fix it, or why it's nil in the first place. I know it was that one specifically from getting rid of each variable individually, but again I didn't (and still don't) know anything about that variable so this knowledge was useless.

Well, that was my train of though at the time, from now on I'll just ask you.

HansAgain
User avatar
Posts: 1133
Joined: 03 Feb 2012, 18:51
Reputation: 265
Contact:

Post » 15 Dec 2014, 20:19

Thanks, Hugo! The fix works alright.
But i think you shouldn't have been so harsh to Turret about it.
I know what he did wasn't really a fix, but at least it prevented the crash and make animated tiles work (but completely, but something is something).

Also, Turret, not because you're the only one modding SE, you're the only who knows how to fix it.

HugoBDesigner
User avatar
Posts: 2101
Joined: 19 Sep 2012, 02:23
Reputation: 662
Contact:

Post » 15 Dec 2014, 20:57

I'm sorry if it sounded like I was being harsh, it wasn't my intention. Also, I was not saying Turret's mod didn't work, it just didn't fix the problem. But anyway, it worked and I'm okay with that. Again, not trying to be harsh here, sorry...

Also, Turret, I'm pretty sure most modders here could mod SE since it's not SOOOO different from 1.6. Also, I never modded SE but I just needed to read a bit of it's code to understand. Plus, I'm pretty sure Alesan knows very well SE (since he was doing the enemies thing). Either way, just letting you know that if you need some help you can ask me :)

TurretBot
User avatar
Posts: 4634
Joined: 15 Mar 2012, 23:18
Reputation: 713
Contact:

Post » 16 Dec 2014, 22:34

Probable fix to this similar bug: http://i.imgur.com/2qFdPpL.png
Change the line in question (animatedtiletrigger.lua line 64) to this:

Code: Select all

         if animatedtimers[x] and animatedtimers[x][y] then
too lazy to make a download sorry

Wary
User avatar
Posts: 638
Joined: 03 Jun 2012, 14:30
Reputation: 57

Post » 16 Dec 2014, 23:32

Don't forget that I LOVE LUA already made a SE mod.


Return to “Modding”

Who is online

Users browsing this forum: No registered users and 1 guest

cron