13.12.2018, 17:45
Hello all, my server crashed at start (not always)
This is error list:
And this are codes from 4076, 4079 from GAMEMODE
And that are part of code. TDs at OnGameModeinit
This is error list:
Код:
[20:38:52] [debug] Server crashed while executing xyz.amx [20:38:52] [debug] AMX backtrace: [20:38:52] [debug] #0 native float () in samp03svr [20:38:52] [debug] #1 0002a5e0 in public zcmd_OnGameModeInit () at D:\scoala proiecte\My Work\gamemodes\xyz.pwn:4076 [20:38:52] [debug] #2 native CallLocalFunction () in samp03svr [20:38:52] [debug] #3 00008fd8 in public SSCANF_OnGameModeInit () at D:\scoala proiecte\My Work\pawno\include\zcmd.inc:68 [20:38:52] [debug] #4 00002278 in public Iter_OnGameModeInit () at D:\scoala proiecte\My Work\pawno\include\sscanf2.inc:211 [20:38:52] [debug] #5 native CallLocalFunction () in samp03svr [20:38:52] [debug] #6 00000e98 in public OnGameModeInit () at D:\scoala proiecte\My Work\pawno\include\foreach.inc:735 [20:38:52] [debug] Run time error 4: "Array index out of bounds" [20:38:52] [debug] Attempted to read/write array element at index 3736 in array of size 100 [20:38:52] [debug] AMX backtrace: [20:38:52] [debug] #0 0002a708 in public zcmd_OnGameModeInit () at D:\scoala proiecte\My Work\gamemodes\xyz.pwn:4079 [20:38:52] [debug] #1 native CallLocalFunction () in samp03svr [20:38:52] [debug] #2 00008fd8 in public SSCANF_OnGameModeInit () at D:\scoala proiecte\My Work\pawno\include\zcmd.inc:68 [20:38:52] [debug] #3 00002278 in public Iter_OnGameModeInit () at D:\scoala proiecte\My Work\pawno\include\sscanf2.inc:211 [20:38:52] [debug] #4 native CallLocalFunction () in samp03svr [20:38:52] [debug] #5 00000e98 in public OnGameModeInit () at D:\scoala proiecte\My Work\pawno\include\foreach.inc:735
Код:
ProfileStats[i] = TextDrawCreate(235.000000, 115.000000, " "); TextDrawBackgroundColor(ProfileStats[i], -1); ///// CRASH GM TextDrawFont(ProfileStats[i], 1); TextDrawLetterSize(ProfileStats[i], 0.300000, 1.000000); /// CRASH GM TextDrawColor(ProfileStats[i], 255); TextDrawSetOutline(ProfileStats[i], 1); TextDrawSetProportional(ProfileStats[i], 1);
Код:
for(new i; i < MAX_PLAYERS; i++) { FuelText[i] = TextDrawCreate(550.0, 386.0," "); TextDrawAlignment(FuelText[i], 2); SpeedText[i] = TextDrawCreate(550.0, 400.0," "); TextDrawAlignment(SpeedText[i], 2); OdoText[i] = TextDrawCreate(550.0, 414.0," "); TextDrawAlignment(OdoText[i], 2); PlayerRon[i] = TextDrawCreate(553.0, 80.0, " "); TextDrawAlignment(PlayerRon[i], 2); TextDrawBackgroundColor(PlayerRon[i], 255); TextDrawFont(PlayerRon[i], 3); TextDrawLetterSize(PlayerRon[i], 0.54, 1.90); TextDrawColor(PlayerRon[i], 0x315A29FF); TextDrawSetOutline(PlayerRon[i], 1); TextDrawSetProportional(PlayerRon[i], 0); TextDrawUseBox(PlayerRon[i], 1); TextDrawBoxColor(PlayerRon[i], 255); TextDrawTextSize(PlayerRon[i], 600.0, 107.0); Spec[i] = TextDrawCreate(559.000000, 199.000000, " "); TextDrawAlignment(Spec[i], 2); TextDrawBackgroundColor(Spec[i], -16776961); TextDrawFont(Spec[i], 2); TextDrawLetterSize(Spec[i], 0.220000, 0.899999); TextDrawColor(Spec[i], 16711935); TextDrawSetOutline(Spec[i], 0); TextDrawSetProportional(Spec[i], 1); TextDrawSetShadow(Spec[i], 0); TextDrawUseBox(Spec[i], 1); TextDrawBoxColor(Spec[i], 170); TextDrawTextSize(Spec[i], 0.000000, -125.000000); ProfileStats[i] = TextDrawCreate(235.000000, 115.000000, " "); TextDrawBackgroundColor(ProfileStats[i], -1); ///// CRASH GM TextDrawFont(ProfileStats[i], 1); TextDrawLetterSize(ProfileStats[i], 0.300000, 1.000000); /// CRASH GM TextDrawColor(ProfileStats[i], 255); TextDrawSetOutline(ProfileStats[i], 1); TextDrawSetProportional(ProfileStats[i], 1); PlayerRespect[i] = TextDrawCreate(285.0, 124.0, " "); TextDrawBackgroundColor(PlayerRespect[i], 255); TextDrawFont(PlayerRespect[i], 2); TextDrawLetterSize(PlayerRespect[i], 0.3, 1.2); TextDrawColor(PlayerRespect[i], -1); TextDrawSetOutline(PlayerRespect[i], 1); TextDrawSetProportional(PlayerRespect[i], 1); /*CellPhoneNumber[i] = TextDrawCreate(416.0, 222.0, " "); TextDrawBackgroundColor(CellPhoneNumber[i], 255); TextDrawFont(CellPhoneNumber[i], 1); TextDrawLetterSize(CellPhoneNumber[i], 0.25, 1.0); TextDrawColor(CellPhoneNumber[i], -65366); TextDrawSetOutline(CellPhoneNumber[i], 0); TextDrawSetProportional(CellPhoneNumber[i], 1); TextDrawSetShadow(CellPhoneNumber[i], 0);*/ }