Strange, code is being skipped.. (OnOplayerDeath) -
RelaxCafe - 04.07.2011
This is a strange thing happening to me. I have made some loops on OnPlayerDeath, but the if I put any code after them, it just gets skipped.. Now this may overload the ram usage and that causes to skip it, but I can't figure any other way to keep my loops on and have the other code under it.. well i fixed it by just placing it before the loops but anyone has a better idea? Same thing with OnPlayerDisconnect ..
Re: Strange, code is being skipped.. (OnOplayerDeath) -
WooTFTW - 04.07.2011
Make sure killerid id is not INVALID PLAYER, i had this bug too.
INVALID PLAYER is when you kill yourself, like jumping off an building and dying etc...
Re: Strange, code is being skipped.. (OnOplayerDeath) -
RelaxCafe - 04.07.2011
Let me tell you what I exactly have.
First, i kill a timer, then change the value of some(damn i forgot its name.. usually start with new..). Then I hide some textdraws, set player's score, check if team player is this, that.. , then if the killerid is connected.. to increase his score. Then 4 loops in a row. and the last code which is about something important gets skipped...
Re: Strange, code is being skipped.. (OnOplayerDeath) -
WooTFTW - 04.07.2011
It would be better if you would show your code.
pawn Код:
OnPlayerDeath()
{
if(killerid != INVALID_PLAYER_ID)
{
// code here
}
}
Put there only your needed code, where you use killerid parameter
Re: Strange, code is being skipped.. (OnOplayerDeath) -
RelaxCafe - 08.07.2011
Nah, its not that, but anything after the timers.. gets skipped..
Re: Strange, code is being skipped.. (OnOplayerDeath) -
Rickye - 08.07.2011
This occurs always with me
tip: Put a print before each command and see the logs to view where is the line that problem occurs....
Re: Strange, code is being skipped.. (OnOplayerDeath) -
Scenario - 08.07.2011
I have had similar problems before. However, it turned out to be either something wrong with my computer or something with Windows. I was able to run the script via Linux and it worked just fine. I never determined the cause of that either.
Re: Strange, code is being skipped.. (OnOplayerDeath) -
leong124 - 08.07.2011
Simply say, if you are not willing to show the code, you may use the crash detect plugin
Re: Strange, code is being skipped.. (OnOplayerDeath) -
Outcast - 08.07.2011
Quote:
Originally Posted by Rickye
This occurs always with me
tip: Put a print before each command and see the logs to view where is the line that problem occurs....
|
This is a good tip, I use that all the time.
Try with it, and like he said, see where the error occurs.