22.08.2011, 17:11
I trying to make server mtd but I can't solve this errors.
I will be really happy if someone can solve this! Thanks.
Code:
E:\Nova mapa (2)\gamemodes\Test.pwn(26) : error 009: invalid array size (negative, zero or out of bounds) E:\Nova mapa (2)\gamemodes\Test.pwn(86) : error 017: undefined symbol "cmd" E:\Nova mapa (2)\gamemodes\Test.pwn(90) : error 017: undefined symbol "pAdmin" E:\Nova mapa (2)\gamemodes\Test.pwn(93) : error 017: undefined symbol "idx" E:\Nova mapa (2)\gamemodes\Test.pwn(95) : error 017: undefined symbol "idx" E:\Nova mapa (2)\gamemodes\Test.pwn(95) : warning 215: expression has no effect E:\Nova mapa (2)\gamemodes\Test.pwn(97) : error 017: undefined symbol "idx" E:\Nova mapa (2)\gamemodes\Test.pwn(99) : error 017: undefined symbol "idx" E:\Nova mapa (2)\gamemodes\Test.pwn(101) : error 017: undefined symbol "idx" E:\Nova mapa (2)\gamemodes\Test.pwn(102) : error 017: undefined symbol "idx" E:\Nova mapa (2)\gamemodes\Test.pwn(102) : warning 215: expression has no effect E:\Nova mapa (2)\gamemodes\Test.pwn(104) : error 017: undefined symbol "idx" E:\Nova mapa (2)\gamemodes\Test.pwn(115) : error 017: undefined symbol "string" E:\Nova mapa (2)\gamemodes\Test.pwn(115) : error 017: undefined symbol "string" E:\Nova mapa (2)\gamemodes\Test.pwn(115) : error 029: invalid expression, assumed zero E:\Nova mapa (2)\gamemodes\Test.pwn(115) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 15 Errors.
Code:
#include <a_samp> #define COLOR_BLUE 0xFF0080FF #define COLOR_GREY 0xFFC0C0C0 #define COLOR_GRAD2 0xFF800040 main() { print("\n----------------------------------"); print(" Test"); print("----------------------------------\n"); } new Motd[32]; new PlayerInfo[MAX_PLAYERS][pInfo]; public OnGameModeInit() { // Don't use these lines if it's a filterscript SetGameModeText("Blank Gamemode"); return 1; } public OnGameModeExit() { return 1; } public OnPlayerRequestClass(playerid, classid) { return 1; } public OnPlayerConnect(playerid) { return 1; } public OnPlayerDisconnect(playerid, reason) { return 1; } public OnPlayerSpawn(playerid) { return 1; } public OnPlayerDeath(playerid, killerid, reason) { return 1; } public OnVehicleSpawn(vehicleid) { return 1; } public OnVehicleDeath(vehicleid, killerid) { return 1; } public OnPlayerText(playerid, text[]) { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmd, "/setmotd", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] >= 5) { new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[32]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /setmotd [text]"); return 1; } if(strlen(result) > 32) { SendClientMessage(playerid, COLOR_GREY,"* Limit for MOTD is 32 Characters!"); return 1; } format(string, sizeof(string), "[ADMIN]: %s (%d) has set the MOTD to %s", sendername,playerid, (result)); SendAdminMessage(COLOR_LIGHTRED,string); format(string, sizeof(string),"%s",(result)); strmid(Motd,string,0,255,sizeof(string)); format(string,sizeof(string),"%s. Build %s",(result),Version); TextDrawSetString(Textdraw3,string); SaveMotd(); new y, m, d; new h,mi,s; getdate(y,m,d); gettime(h,mi,s); format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /setmotd %s",d,m,y,h,mi,s,sendername, (result)); AdminLog(string); } } return 1; } return 1; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { return 1; } public OnPlayerExitVehicle(playerid, vehicleid) { return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { return 1; } public OnPlayerEnterCheckpoint(playerid) { return 1; } public OnPlayerLeaveCheckpoint(playerid) { return 1; } public OnPlayerEnterRaceCheckpoint(playerid) { return 1; } public OnPlayerLeaveRaceCheckpoint(playerid) { return 1; } public OnRconCommand(cmd[]) { return 1; } public OnPlayerRequestSpawn(playerid) { return 1; } public OnObjectMoved(objectid) { return 1; } public OnPlayerObjectMoved(playerid, objectid) { return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { return 1; } public OnVehicleMod(playerid, vehicleid, componentid) { return 1; } public OnVehiclePaintjob(playerid, vehicleid, paintjobid) { return 1; } public OnVehicleRespray(playerid, vehicleid, color1, color2) { return 1; } public OnPlayerSelectedMenuRow(playerid, row) { return 1; } public OnPlayerExitedMenu(playerid) { return 1; } public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid) { return 1; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { return 1; } public OnRconLoginAttempt(ip[], password[], success) { return 1; } public OnPlayerUpdate(playerid) { return 1; } public OnPlayerStreamIn(playerid, forplayerid) { return 1; } public OnPlayerStreamOut(playerid, forplayerid) { return 1; } public OnVehicleStreamIn(vehicleid, forplayerid) { return 1; } public OnVehicleStreamOut(vehicleid, forplayerid) { return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { return 1; } public OnPlayerClickPlayer(playerid, clickedplayerid, source) { return 1; } public showmotd(playerid) { TextDrawShowForPlayer(playerid, Textdraw2); TextDrawShowForPlayer(playerid, Textdraw3); return 1; }