I reported this a while back, and was too busy to persue at the time.
I can confirm this "possible" bug is in all versions from A7.07 up to current beta 7.24.

We intermittently get the following errors E 1515.
Invalid argument in Play_one_steam ENTITY.
Invalid argument in Flame_Check_Health ENTITY.

Now Flame_check_health.
We've put entity Pointer checks in before calling or using the me pointer but it is STILL BROKEN with following code?


Function Play_One_Steam(){
if (me==NULL) {return;} //trying to get rid of invalid argument bug.
If (Snd_Playing(POS_Hand)==0){
If (Random(100)<50){
POS_Hand=ent_Playsound(ME,Steam1_Snd,FX_Vol*10);
}ELSE{
POS_Hand=ent_Playsound(ME,Steam_bub_Snd,FX_Vol*10);
}
}
}


Function Flame_Check_Health(){

if (me==NULL) {return;} //trying to get rid of invalid argument bug.
c_setminmax(me);//we got some damage our scale will be adjusted,
If (Vec_dist(Player.x,my.x)<500){
Play_One_Steam();
}

If (MY.Skill40<=0){//Flame death
MY.event=null;
emit(3,MY.POS,particle_smoke); // emit( smoke
//score some points.
//Do some smoke or sizzle.
wait(2); //Give things above a chance to start before removing me.

if (me==NULL) {return;} //trying to get rid of invalid argument bug.
str_for_entfile (temp_str,ME);
IF (Str_Cmpi(temp_str,"fire_land.mdl")==1){ //Land fire extinguish, so get bonus and count it off the list.
Bonus_Score+=1;
Curr_flames-=1;//So weather knows how many fires are raging. only decrement immediately before
}
ent_Remove(me);Return;
}
}

//Fire will use this event action. Water scans fire to put it out, however other things may scan fire to flare it up?
Function Fire_Ev(){
If ((EVENT_TYPE == EVENT_SCAN)&&(indicator==_Water)){// Put me out
//Now result= distance from water sprite, so lets give us more discharge of strength the closer they are to us.

My.Skill40-=Water_Strength/(result+1); //So if a dead hit, you get maximum Water_strength/1 discharge. per hit which is 16/second for constant pounding.
//one_beep(2);//debug flame scanned by water
if (me==NULL) {return;} //trying to get rid of invalid argument bug.
Flame_Check_Health();
}ELSE{//no scan damage, check for direct hit.
If (YOU!=NULL){
IF (YOU._TYPE==_TYPE_WATERSPRAY){
My.Skill40-=1; //Get reduction of health by 1 for collissions.
// one_beep(3);//debug flame collide with water
if (me==NULL) {return;} //trying to get rid of invalid argument bug.
Flame_Check_Health();
}
IF (YOU._TYPE==_TYPE_WATER_Lake){
My.Skill40-=10; //Get reduction of health by 10 for collission with lake ie. kill me very fast.
// one_beep(3);//debug flame collide with water
if (me==NULL) {return;} //trying to get rid of invalid argument bug.
Flame_Check_Health();
}

}
}

}

Last edited by Jethro; 08/14/08 02:38.