Big Problem
#1

Hello there friend i have a big problem at my server.
Sometimes there appears a lot of [debug] errors at a function in my
gamemode and the server stop receiving any data. So the login dialog don't appear
there u can't use anything. There appear errors at "OnTersUpdate" and at "xShowGangZonesForPlayer".
Nothing works the register/login dialogs don't appear. Please help me if u know how.

OnTersUpdate errors:
PHP код:
[18:40:32] [debug]  Attempted to read/write array element at index 255 in array of size 15
[18:40:32] [debugAMX backtrace:
[
18:40:32] [debug#0 0015cdd8 in public OnTersUpdate () at C:\Users\A\Dropbox\IS\gamemodes\IS.pwn:31943
[18:40:33] [debugRun time error 4"Array index out of bounds"
[18:40:33] [debug]  Attempted to read/write array element at index 255 in array of size 15
[18:40:33] [debugAMX backtrace:
[
18:40:33] [debug#0 0015cdd8 in public OnTersUpdate () at C:\Users\A\Dropbox\IS\gamemodes\IS.pwn:31943
[18:40:34] [debugRun time error 4"Array index out of bounds"
[18:40:34] [debug]  Attempted to read/write array element at index 255 in array of size 15
[18:40:34] [debugAMX backtrace:
[
18:40:34] [debug#0 0015cdd8 in public OnTersUpdate () at C:\Users\A\Dropbox\IS\gamemodes\IS.pwn:31943
[18:40:35] [debugRun time error 4"Array index out of bounds"
[18:40:35] [debug]  Attempted to read/write array element at index 255 in array of size 15
[18:40:35] [debugAMX backtrace:
[
18:40:35] [debug#0 0015cdd8 in public OnTersUpdate () at C:\Users\A\Dropbox\IS\gamemodes\IS.pwn:31943
[18:40:36] [debugRun time error 4"Array index out of bounds"
[18:40:36] [debug]  Attempted to read/write array element at index 255 in array of size 15
[18:40:36] [debugAMX backtrace:
[
18:40:36] [debug#0 0015cdd8 in public OnTersUpdate () at C:\Users\A\Dropbox\IS\gamemodes\IS.pwn:31943
[18:40:37] [debugRun time error 4"Array index out of bounds"
[18:40:37] [debug]  Attempted to read/write array element at index 255 in array of size 15
[18:40:37] [debugAMX backtrace:
[
18:40:37] [debug#0 0015cdd8 in public OnTersUpdate () at C:\Users\A\Dropbox\IS\gamemodes\IS.pwn:31943
[18:40:38] [debugRun time error 4"Array index out of bounds"
[18:40:38] [debug]  Attempted to read/write array element at index 255 in array of size 15
[18:40:38] [debugAMX backtrace:
[
18:40:38] [debug#0 0015cdd8 in public OnTersUpdate () at C:\Users\A\Dropbox\IS\gamemodes\IS.pwn:31943
[18:40:39] [debugRun time error 4"Array index out of bounds"
[18:40:39] [debug]  Attempted to read/write array element at index 255 in array of size 15
[18:40:39] [debugAMX backtrace:
[
18:40:39] [debug#0 0015cdd8 in public OnTersUpdate () at C:\Users\A\Dropbox\IS\gamemodes\IS.pwn:31943
[18:40:40] [debugRun time error 4"Array index out of bounds"
[18:40:40] [debug]  Attempted to read/write array element at index 255 in array of size 15
[18:40:40] [debugAMX backtrace:
[
18:40:40] [debug#0 0015cdd8 in public OnTersUpdate () at C:\Users\A\Dropbox\IS\gamemodes\IS.pwn:31943 
xShowGangZonesForPlayer errors:
PHP код:
[16:58:44] [debug]  Attempted to read/write array element at index 255 in array of size 15
[16:58:44] [debugAMX backtrace:
[
16:58:44] [debug#0 00166e2c in xShowAllGangZonesForPlayer (playerid=15) at C:\Users\A\Dropbox\IS\gamemodes\IS.pwn:32684
[16:58:44] [debug#1 000210fc in ?? (... <1 argument>) at C:\Users\A\Dropbox\IS\gamemodes\IS.pwn:1900
[16:58:44] [debug#2 00014464 in public MP_OPC (playerid=15) at C:\Users\A\Dropbox\IS\pawno\include\YSI\y_hooks/impl.inc:618
[16:58:44] [debug#3 native CallLocalFunction () from samp03svr
[16:58:44] [debug#4 0000b488 in public SSCANF_OnPlayerConnect (playerid=15) at C:\Users\A\Dropbox\IS\pawno\include\mSelection.inc:432
[16:58:44] [debug#5 000027d0 in public Itter_OnPlayerConnect (playerid=15) at C:\Users\A\Dropbox\IS\pawno\include\sscanf2.inc:236
[16:58:44] [debug#6 00001274 in public OnPlayerConnect (playerid=15) at C:\Users\A\Dropbox\IS\pawno\include\YSI\y_iterate.inc:646 
Line: 31943:
PHP код:
        else
        {
            if( 
GetPlayersInTerxTerritory][ t_attacker ] ) < STARTUP_MEMBERS )
              {
                  
SendGangNotificationfTerritory][ t_attacker ], "~r~~h~We have lost the territory war against~n~~r~~h~%s in %s (/ters)."50000GangTerritory][ t_owner ] ][ g_name ], Territory][ t_name ] );
                
line31943 SendGangNotificationfTerritory][ t_owner ], "~g~~h~~h~We have won the territory war against~n~~g~~h~~h~%s in %s (/ters)."50001GangTerritory][ t_attacker ] ][ g_name ], Territory][ t_name ] ); 
Reply
#2

Show me enum Territory
Reply
#3

Quote:
Originally Posted by skuller12
Посмотреть сообщение
Show me enum Territory
PHP код:
enum TerritoryData
{
    
t_name35 ],
    
Float:t_minx,
    
Float:t_miny,
    
Float:t_maxx,
    
Float:t_maxy,
    
t_owner,
    
t_attacker,
    
bool:t_attacked,
    
t_kills],
    
bool:t_started,
    
t_timer,
    
t_timertick,
    
t_ter,
    
t_points,
    
t_attacked_times
};
new 
TerritoryMAX_TERRITORIES ][ TerritoryData ]; 
If you know skuller or somebody how to fix this please help.
It's really urgent because.. there are players that want to join..
and sometimes they can't login because this bug apear.

ALSO i forgot to remember that when i restart the server everything go back
to normal and the bug stop to appear for a time. And after idk some days or sometimes
after some minutes, hours it's random.. the time is random when this bug appear.
Reply
#4

There ia nothing called Territory[x] in your enums, which i believe is the reason od these errors.
Reply
#5

That " x " means territory ID, and it is defines in function.
Reply
#6

I can't understand the use of the part after the text that is sent as a gang message these parts
Код:
5000, 0, Gang[ Territory[ x ][ t_owner ] ][ g_name ], Territory[ x ][ t_name ] );
and this
Код:
5000, 1, Gang[ Territory[ x ][ t_attacker ] ][ g_name ], Territory[ x ][ t_name ] );
Reply
#7

Yes it is sent as gang message for the ter owner and attacker like: we have won the territory war against grove or we have lost the war against grove in ganton you know ?
Reply
#8

Okay but you already sent the message to the owner by this code
Код:
SendGangNotificationf( Territory[ x ][ t_owner ]
I can't find any use for these codes i sent you above..
Reply
#9

Man sendgangnotificationf is the functions like: sendclientmessage( playerid, color, "text" );
Reply
#10

Since it is like it then make it like that
Код:
SendGangNotificationf( Territory[ x ][ t_attacker ],COLOR_RED, "~r~~h~We have lost the territory war against~n~~r~~h~%s in %s (/ters).");
SendGangNotificationf( Territory[ x ][ t_owner ],COLOR_RED, "~g~~h~~h~We have won the territory war against~n~~g~~h~~h~%s in %s (/ters).");
NOTE: you can change "COLOR_RED" to the color u want but u need to define the color in defines.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)