ONPLAYERUPDATE
#1

I am using x337's gang system...

i get this error in console (using crashdetect)

PHP код:
[18:30:17] [debugAMX backtrace:
[
18:30:17] [debug#0 0001fa9c in ?? (16, 473, 2, -994299568, 1147541815, 1089041245, 263172, 263056, -1) from Gang_System.amx
[18:30:17] [debug#1 0001f2bc in ?? (16) from Gang_System.amx
[18:30:17] [debug#2 0000eec0 in public OnPlayerUpdate (16) from Gang_System.amx 

This is what i got @ onplayerupdate

PHP код:
public OnPlayerUpdate(playerid//RyDer
{
    if(
Player[playerid][CreatingZone])
    {
        new 
KeysUpDownLeftRight;
        
GetPlayerKeys(playeridKeysUpDownLeftRight);
        
TogglePlayerControllable(playeridfalse);
        if(
LeftRight == KEY_LEFT)
        {
            
MinPos[playerid][0] -= 8.0;
            
GangZoneDestroy(PlayerZone[playerid]);
            
PlayerZone[playerid] = GangZoneCreate(MinPos[playerid][0], MinPos[playerid][1], MaxPos[playerid][0], MaxPos[playerid][1]);
            
GangZoneShowForPlayer(playeridPlayerZone[playerid], HexToInt("000000FF"));
        }
        else if(
LeftRight KEY_LEFT && Keys KEY_FIRE)
        {
            
MinPos[playerid][0] += 8.0;
            
GangZoneDestroy(PlayerZone[playerid]);
            
PlayerZone[playerid] = GangZoneCreate(MinPos[playerid][0], MinPos[playerid][1], MaxPos[playerid][0], MaxPos[playerid][1]);
            
GangZoneShowForPlayer(playeridPlayerZone[playerid], HexToInt("000000FF"));
        }
        else if(
LeftRight == KEY_RIGHT)
        {
            
MaxPos[playerid][0] += 8.0;
            
GangZoneDestroy(PlayerZone[playerid]);
            
PlayerZone[playerid] = GangZoneCreate(MinPos[playerid][0], MinPos[playerid][1], MaxPos[playerid][0], MaxPos[playerid][1]);
            
GangZoneShowForPlayer(playeridPlayerZone[playerid], HexToInt("000000FF"));
        }
        else if(
LeftRight KEY_RIGHT && Keys KEY_FIRE)
        {
            
MaxPos[playerid][0] -= 8.0;
            
GangZoneDestroy(PlayerZone[playerid]);
            
PlayerZone[playerid] = GangZoneCreate(MinPos[playerid][0], MinPos[playerid][1], MaxPos[playerid][0], MaxPos[playerid][1]);
            
GangZoneShowForPlayer(playeridPlayerZone[playerid], HexToInt("000000FF"));
        }
        else if(
UpDown == KEY_UP)
        {
            
MaxPos[playerid][1] += 8.0;
            
GangZoneDestroy(PlayerZone[playerid]);
            
PlayerZone[playerid] = GangZoneCreate(MinPos[playerid][0], MinPos[playerid][1], MaxPos[playerid][0], MaxPos[playerid][1]);
            
GangZoneShowForPlayer(playeridPlayerZone[playerid], HexToInt("000000FF"));
        }
        else if(
UpDown KEY_UP && Keys KEY_FIRE)
        {
            
MaxPos[playerid][1] -= 8.0;
            
GangZoneDestroy(PlayerZone[playerid]);
            
PlayerZone[playerid] = GangZoneCreate(MinPos[playerid][0], MinPos[playerid][1], MaxPos[playerid][0], MaxPos[playerid][1]);
            
GangZoneShowForPlayer(playeridPlayerZone[playerid], HexToInt("000000FF"));
        }
        else if(
UpDown == KEY_DOWN)
        {
            
MinPos[playerid][1] -= 8.0;
            
GangZoneDestroy(PlayerZone[playerid]);
            
PlayerZone[playerid] = GangZoneCreate(MinPos[playerid][0], MinPos[playerid][1], MaxPos[playerid][0], MaxPos[playerid][1]);
            
GangZoneShowForPlayer(playeridPlayerZone[playerid], HexToInt("000000FF"));
        }
        else if(
UpDown KEY_DOWN && Keys KEY_FIRE)
        {
            
MinPos[playerid][1] += 8.0;
            
GangZoneDestroy(PlayerZone[playerid]);
            
PlayerZone[playerid] = GangZoneCreate(MinPos[playerid][0], MinPos[playerid][1], MaxPos[playerid][0], MaxPos[playerid][1]);
            
GangZoneShowForPlayer(playeridPlayerZone[playerid], HexToInt("000000FF"));
        }
        else if(
Keys KEY_SECONDARY_ATTACK)
        {
            
TogglePlayerControllable(playeridtrue);
            
Player[playerid][CreatingZone] = false;
            
ShowPlayerDialog(playeridDIALOG_SAVEZONEDIALOG_STYLE_INPUT"Gang System""Input gang zone name below, press \"Delete\" to delete current zone""Save""Delete");
        }
    }
    return 
1;

Any solutions?
Reply
#2

According to the logs, nothing matches from the code. Can you please post the whole logs (what it's written above [debug] AMX backtrace:) and compile with debug info: https://github.com/Zeex/samp-plugin-...ith-debug-info

After creating the file described in the link above and re-compiling, start the server and when you get logs from crashdetect again post them here (everything, not parts of it).
Reply
#3

I just removed that part of code as i realized its used to create gang zone while i am creating zones manually, thanks anyway.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)