Raised This Month: $51 Target: $400
 12% 

Code that crashes hl2dm; anyone see why?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kirewv
Senior Member
Join Date: Oct 2007
Old 04-24-2008 , 20:28   Code that crashes hl2dm; anyone see why?
Reply With Quote #1

PHP Code:
   while(sm_OnFire[client])
   {
    if (!
IsClientInGame(client) || !IsPlayerAlive(client))
    {
     break;
    }
    
GetClientEyePosition(client,vOrigin);
    
GetClientEyeAngles(clientvAngles);
    
BurnTrace TR_TraceRayEx(vOriginvAnglesMASK_PLAYERSOLID_BRUSHONLYRayType_Infinite); 
    if(
TR_DidHit(BurnTrace))
    {
     
Victim TR_GetEntityIndex(); 
     
TR_GetEndPosition(vTraceEndBurnTrace);
     if(
GetVectorDistance(vTraceEndvOrigin) <= BurnDistance && Victim >= )
     {
      
IgniteEntity(VictimGetConVarFloat(sm_BurnDuration));
      
CloseHandle(BurnTrace);
      continue;
     }
     else
     {
      
CloseHandle(BurnTrace);
      continue;
     }
 
    }
    else
    {
     continue;
    }


Last edited by kirewv; 04-24-2008 at 21:03.
kirewv is offline
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 04-24-2008 , 20:37   Re: Code that crashes hl2dm; anyone see why?
Reply With Quote #2

The code never ends.
It is on a while loop that is never set to false...
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
kirewv
Senior Member
Join Date: Oct 2007
Old 04-24-2008 , 20:57   Re: Code that crashes hl2dm; anyone see why?
Reply With Quote #3

No, that is not it. I have a timer that changes sm_OnFire[client] to false and it is a global variable.

Last edited by kirewv; 04-24-2008 at 21:07.
kirewv is offline
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 04-24-2008 , 21:24   Re: Code that crashes hl2dm; anyone see why?
Reply With Quote #4

Lol.

You don't understand a thing.

While the function does not finish, the next frame will not happen, and the timer will never be executed.
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
kirewv
Senior Member
Join Date: Oct 2007
Old 04-24-2008 , 21:47   Re: Code that crashes hl2dm; anyone see why?
Reply With Quote #5

I see, so perhaps I should use a repeating timer instead of the while loop?
And yes I understand little. I am quite new to scripting.
kirewv is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:34.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode