12.11.2016, 09:01
Please help me fast
Gamemode Code
I Have Marked The Error And Error Line With The Same Colour.Please Tell Me Other Error's Is due To Includes.
Код:
[04:46:20] [debug] Server crashed while executing usfMain.amx [04:46:20] [debug] AMX backtrace: [04:46:20] [debug] #0 native mysql_connect () from mysql.so [04:46:20] [debug] #1 00014ddc in public Iter_OnGameModeInit () at C:\Users\Anurag\Desktop\Server\gamemodes\usfMain.pwn:909 [04:46:20] [debug] #2 native CallLocalFunction () from samp03svr [04:46:20] [debug] #3 00007dd8 in public zcmd_OnGameModeInit () at C:\Users\Anurag\Desktop\Server\pawno\include\foreach.inc:720 [04:46:20] [debug] #4 native CallLocalFunction () from samp03svr [04:46:20] [debug] #5 000070a8 in public SSCANF_OnGameModeInit () at C:\Users\Anurag\Desktop\Server\pawno\include\zcmd.inc:68 [04:46:20] [debug] #6 0000074c in public OnGameModeInit () at C:\Users\Anurag\Desktop\Server\pawno\include\sscanf2.inc:205 [04:46:20] [debug] Native backtrace:
I Have Marked The Error And Error Line With The Same Colour.Please Tell Me Other Error's Is due To Includes.
Код:
public OnGameModeInit() { MySQL = mysql_connect(MySQL_Host, MySQL_User, MySQL_Data, MySQL_Pass); mysql_log(LOG_ALL); if(mysql_errno(MySQL) == 0) print("MySQL connection successful!"); else print("MySQL connection failed!"); LMSObject = CreateObject(18759, 2736.0537109375, -1765.4870605469, 78.151954650879, 0, 0, 0); SendRconCommand("hostname "HOSTNAME""); SetGameModeText("Stunt/Freeroam/DM/Fun"); AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); planelist = LoadModelSelectionMenu("planes.txt"); boatlist = LoadModelSelectionMenu("boats.txt"); vehlist = LoadModelSelectionMenu("vehicles.txt"); SetWorldTime(12); UsePlayerPedAnims(); EnableStuntBonusForAll(varStuntBonus); LoadVehicles(); new h, m, s, y, mon, day; gettime(h, m, s); getdate(y, mon, day); LoadServerStats(); format(gLastRestartedTime, sizeof(gLastRestartedTime), "%d:%d:%d", h, m, s); format(gLastRestartedDate, sizeof(gLastRestartedDate), "%d/%d/%d", day, mon, y); mysql_format(MySQL, gQuery, 256, "UPDATE `"Servers"` SET `Last_Restarted_Time` = '%s', `Last_Restarted_Date` = '%s' WHERE `Server` = '1';", gLastRestartedTime, gLastRestartedDate); mysql_tquery(MySQL, gQuery, "", ""); SetTimer("RandomMessages", 90000, true); SetTimer("DMcountUpdate", 1000, true); SetTimer("TDmsg",8000,true); FixTimer = SetTimer("AutoFixer", 1000, true); cTDcolor = SetTimer("ChangeTDcolor", 2000, false); // gTextDraw[0] = TextDrawCreate(395.500000, 434.566650, "usebox"); TextDrawLetterSize(gTextDraw[0], 0.000000, 1.430866); TextDrawTextSize(gTextDraw[0], -2.000000, 0.000000); TextDrawAlignment(gTextDraw[0], 1); TextDrawColor(gTextDraw[0], 0); TextDrawUseBox(gTextDraw[0], true); TextDrawBoxColor(gTextDraw[0], 102); TextDrawSetShadow(gTextDraw[0], 0); TextDrawSetOutline(gTextDraw[0], 0); TextDrawFont(gTextDraw[0], 0); gTextDraw[1] = TextDrawCreate(15.500000, 434.311096, "~w~/FDM: ~r~0 ~w~/WAR: ~r~0 ~w~/MINI: ~r~0 ~w~/RDM: ~r~0 ~w~/SAWNDM: ~r~0 ~w~/ODM: ~r~0"); TextDrawLetterSize(gTextDraw[1], 0.254000, 1.282665); TextDrawAlignment(gTextDraw[1], 1); TextDrawColor(gTextDraw[1], -1); TextDrawSetShadow(gTextDraw[1], 0); TextDrawSetOutline(gTextDraw[1], 1); TextDrawBackgroundColor(gTextDraw[1], 51); TextDrawFont(gTextDraw[1], 1); TextDrawSetProportional(gTextDraw[1], 1); gTextDraw[2] = TextDrawCreate(471.500000, 385.777770, "~r~~h~~h~Unleashed Stunt Freeroam"); TextDrawLetterSize(gTextDraw[2], 0.339998, 1.767999); TextDrawAlignment(gTextDraw[2], 1); TextDrawColor(gTextDraw[2], -1); TextDrawSetShadow(gTextDraw[2], 0); TextDrawSetOutline(gTextDraw[2], 1); TextDrawBackgroundColor(gTextDraw[2], 51); TextDrawFont(gTextDraw[2], 3); TextDrawSetProportional(gTextDraw[2], 1); gTextDraw[3] = TextDrawCreate(516.500000, 402.577758, "~b~~h~~h~v2.1"); TextDrawLetterSize(gTextDraw[3], 0.339998, 1.767999); TextDrawAlignment(gTextDraw[3], 1); TextDrawColor(gTextDraw[3], -1); TextDrawSetShadow(gTextDraw[3], 0); TextDrawSetOutline(gTextDraw[3], 1); TextDrawBackgroundColor(gTextDraw[3], 51); TextDrawFont(gTextDraw[3], 3); TextDrawSetProportional(gTextDraw[3], 1); gTextDraw[4] = TextDrawCreate(483.500000, 418.755584, "~y~~h~"SERVER_WEBSITE""); TextDrawLetterSize(gTextDraw[4], 0.339998, 1.767999); TextDrawAlignment(gTextDraw[4], 1); TextDrawColor(gTextDraw[4], -1); TextDrawSetShadow(gTextDraw[4], 0); TextDrawSetOutline(gTextDraw[4], 1); TextDrawBackgroundColor(gTextDraw[4], 51); TextDrawFont(gTextDraw[4], 3); TextDrawSetProportional(gTextDraw[4], 1); TPInfo[0] = TextDrawCreate(456.500000, 350.933349, ""); TextDrawLetterSize(TPInfo[0], 0.165388, 1.556442); TextDrawAlignment(TPInfo[0], 1); TextDrawColor(TPInfo[0], -1); TextDrawSetShadow(TPInfo[0], 0); TextDrawSetOutline(TPInfo[0], 1); TextDrawBackgroundColor(TPInfo[0], 51); TextDrawFont(TPInfo[0], 1); TextDrawSetProportional(TPInfo[0], 1); TPInfo[1] = TextDrawCreate(456.500000, 336.622222, ""); TextDrawLetterSize(TPInfo[1], 0.165388, 1.556442); TextDrawAlignment(TPInfo[1], 1); TextDrawColor(TPInfo[1], -1); TextDrawSetShadow(TPInfo[1], 0); TextDrawSetOutline(TPInfo[1], 1); TextDrawBackgroundColor(TPInfo[1], 51); TextDrawFont(TPInfo[1], 1); TextDrawSetProportional(TPInfo[1], 1); TPInfo[2] = TextDrawCreate(456.500000, 322.311126, ""); TextDrawLetterSize(TPInfo[2], 0.165388, 1.556442); TextDrawAlignment(TPInfo[2], 1); TextDrawColor(TPInfo[2], -1); TextDrawSetShadow(TPInfo[2], 0); TextDrawSetOutline(TPInfo[2], 1); TextDrawBackgroundColor(TPInfo[2], 51); TextDrawFont(TPInfo[2], 1); TextDrawSetProportional(TPInfo[2], 1); TPInfo[3] = TextDrawCreate(456.000000, 308.000000, ""); TextDrawLetterSize(TPInfo[3], 0.165388, 1.556442); TextDrawAlignment(TPInfo[3], 1); TextDrawColor(TPInfo[3], -1); TextDrawSetShadow(TPInfo[3], 0); TextDrawSetOutline(TPInfo[3], 1); TextDrawBackgroundColor(TPInfo[3], 51); TextDrawFont(TPInfo[3], 1); TextDrawSetProportional(TPInfo[3], 1); InfoTD = TextDrawCreate(81.500000, 413.155670, "Don't forget to try our best maps at /dreamyland!"); TextDrawLetterSize(InfoTD, 0.272498, 1.662222); TextDrawAlignment(InfoTD, 1); TextDrawColor(InfoTD, -1); TextDrawSetShadow(InfoTD, 0); TextDrawSetOutline(InfoTD, 1); TextDrawBackgroundColor(InfoTD, 51); TextDrawFont(InfoTD, 1); TextDrawSetProportional(InfoTD, 1); u = TextDrawCreate(6.000000, 406.311218, "U"); TextDrawLetterSize(u, 0.661500, 2.390223); TextDrawAlignment(u, 1); TextDrawColor(u, -5963521); TextDrawSetShadow(u, 0); TextDrawSetOutline(u, 1); TextDrawBackgroundColor(u, 51); TextDrawFont(u, 3); TextDrawSetProportional(u, 1); sf = TextDrawCreate(20.500000, 405.688934, "SF"); TextDrawLetterSize(sf, 0.671500, 2.440000); TextDrawAlignment(sf, 1); TextDrawColor(sf, -65281); TextDrawSetShadow(sf, 0); TextDrawSetOutline(sf, 1); TextDrawBackgroundColor(sf, 51); TextDrawFont(sf, 3); TextDrawSetProportional(sf, 1); return 1; }