Big Problem -
FaLLenGirL - 31.05.2017
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] [debug] AMX backtrace:
[18:40:32] [debug] #0 0015cdd8 in public OnTersUpdate () at C:\Users\A\Dropbox\IS\gamemodes\IS.pwn:31943
[18:40:33] [debug] Run 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] [debug] AMX backtrace:
[18:40:33] [debug] #0 0015cdd8 in public OnTersUpdate () at C:\Users\A\Dropbox\IS\gamemodes\IS.pwn:31943
[18:40:34] [debug] Run 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] [debug] AMX backtrace:
[18:40:34] [debug] #0 0015cdd8 in public OnTersUpdate () at C:\Users\A\Dropbox\IS\gamemodes\IS.pwn:31943
[18:40:35] [debug] Run 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] [debug] AMX backtrace:
[18:40:35] [debug] #0 0015cdd8 in public OnTersUpdate () at C:\Users\A\Dropbox\IS\gamemodes\IS.pwn:31943
[18:40:36] [debug] Run 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] [debug] AMX backtrace:
[18:40:36] [debug] #0 0015cdd8 in public OnTersUpdate () at C:\Users\A\Dropbox\IS\gamemodes\IS.pwn:31943
[18:40:37] [debug] Run 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] [debug] AMX backtrace:
[18:40:37] [debug] #0 0015cdd8 in public OnTersUpdate () at C:\Users\A\Dropbox\IS\gamemodes\IS.pwn:31943
[18:40:38] [debug] Run 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] [debug] AMX backtrace:
[18:40:38] [debug] #0 0015cdd8 in public OnTersUpdate () at C:\Users\A\Dropbox\IS\gamemodes\IS.pwn:31943
[18:40:39] [debug] Run 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] [debug] AMX backtrace:
[18:40:39] [debug] #0 0015cdd8 in public OnTersUpdate () at C:\Users\A\Dropbox\IS\gamemodes\IS.pwn:31943
[18:40:40] [debug] Run 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] [debug] AMX 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] [debug] AMX 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( GetPlayersInTer( x, Territory[ x ][ t_attacker ] ) < STARTUP_MEMBERS )
{
SendGangNotificationf( Territory[ x ][ t_attacker ], "~r~~h~We have lost the territory war against~n~~r~~h~%s in %s (/ters).", 5000, 0, Gang[ Territory[ x ][ t_owner ] ][ g_name ], Territory[ x ][ t_name ] );
line: 31943 SendGangNotificationf( Territory[ x ][ t_owner ], "~g~~h~~h~We have won the territory war against~n~~g~~h~~h~%s in %s (/ters).", 5000, 1, Gang[ Territory[ x ][ t_attacker ] ][ g_name ], Territory[ x ][ t_name ] );
Re: Big Problem -
skuller12 - 31.05.2017
Show me enum Territory
Re: Big Problem -
FaLLenGirL - 01.06.2017
Quote:
Originally Posted by skuller12
Show me enum Territory
|
PHP код:
enum TerritoryData
{
t_name[ 35 ],
Float:t_minx,
Float:t_miny,
Float:t_maxx,
Float:t_maxy,
t_owner,
t_attacker,
bool:t_attacked,
t_kills[ 2 ],
bool:t_started,
t_timer,
t_timertick,
t_ter,
t_points,
t_attacked_times
};
new Territory[ MAX_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.
Re: Big Problem -
JasonRiggs - 01.06.2017
There ia nothing called Territory[x] in your enums, which i believe is the reason od these errors.
Re: Big Problem -
FaLLenGirL - 01.06.2017
That " x " means territory ID, and it is defines in function.
Re: Big Problem -
JasonRiggs - 01.06.2017
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 ] );
Re: Big Problem -
FaLLenGirL - 01.06.2017
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 ?
Re: Big Problem -
JasonRiggs - 01.06.2017
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..
Re: Big Problem -
FaLLenGirL - 01.06.2017
Man sendgangnotificationf is the functions like: sendclientmessage( playerid, color, "text" );
Re: Big Problem -
JasonRiggs - 01.06.2017
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.