ID:1894082
 
(See the best response by Ter13.)
Code:
obj/firedragon
fire
icon='on fire.dmi'
bounds="30,4 to 61,10"
Crossed(A)
if(ismob(A))
var/mob/O=A
if(O!=src.Gowner)
while(O in obounds(src))
// O.GetBurned()
sleep(40)
New()
..()
var/despawner=rand(50,150)
spawn(despawner)
src.Gowner=null
src.loc=null


im creating it like this basically:
                for(var/i=0;i<5;i++)
var/obj/firedragonslayer/fireturf/S=new()
S.Gowner=usr
S.step_x=rand(-32,32)
S.step_y=rand(-32,32)
S.loc=usr.loc

Problem description: Unsure why this causes my game to crash, i'm aware there are other methods of doing what i'm trying to do just looking to see why this would cause a crash

It crashes when a mob walks into the fire and the fire disapears
Best response
change your while loop to:

while(loc&&(O in obounds(src)))

Looks like it's crashing because the object no longer has a loc, but bounds is still being called. This is an old bug.
ic, thanks
I was checking, but obounds() shouldn't be crashing if O's loc is null. I remember there was a bounds crash at one point, but I thought that was fixed. Anyway my testing isn't showing any kind of crash now when the reference object has a null loc.
i'm still using 506 so if you fixed in 507 might be why
i'm still using 506

At first I was like:



And then I was like:



You are missing over a year of bugfixes and features. 507 and 508 have fixed a HUGE number of bugs and improved performance significantly, including fixing several massive memory leaks.
I was going to switch to the latest version once i started hosting my game lol. Using the new versions the compiler seem to take 1-2 minutes for every compile. In 506.1250 only the first compile takes 1-2 minutes the rest are ten seconds.

Didn't seem like a years worth tho
Didn't seem like a years worth tho

506.1247 was released May 16 2014. It was the final build in the 506 major version. http://www.byond.com/ forum/?post=180952&page=10#comment10137117

That's 2 days shy of 14 months. Also, if your game is taking 1-2 minutes to compile, something's pretty seriously wrong with what you are doing. (Let's not talk about SS13. I know that you only compile SS13 when you really need to make a sandwich, boil some water, and do some gardening.)