Strange, code is being skipped.. (OnOplayerDeath)
#1

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 ..
Reply
#2

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...
Reply
#3

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...
Reply
#4

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
Reply
#5

Nah, its not that, but anything after the timers.. gets skipped..
Reply
#6

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....
Reply
#7

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.
Reply
#8

Simply say, if you are not willing to show the code, you may use the crash detect plugin
Reply
#9

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)