31.07.2012, 22:00
Evry command that I make in sscanf i have a lot of errors. For example this was my frist sscanf command in this gamemod:
And I have those errors:
What to do?
Код:
CMD:makeleader(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] > 1338) return SCM(playerid,-1,"Niste ovlasteni za koristenje ove komande.");
{
new igrac,
orgID,
szPlayerName[MAX_PLAYER_NAME],
szPoruka[105];
if(sscanf, params, "ud", igrac, orgID) return SCM(playerid,-1,"Koristenje: /makeleader [igracev ID/dio imena] [org ID]");
else if(igrac == INVALID_PLAYER_ID) return SCM(playerid,-1,"Pogresan ID igraca!");
else if(orgID < 1 || orgID > MAX_ORGS) return SCM(playerid,-1,"ID organizacije ne moze biti manj od 1, i veci od "MAX_ORGS".);
PlayerInfo[igrac][pLider] = orgID;
PlayerInfo[igrac][pRank] = 6;
switch(orgID)
{
case 1:// LSPD
{
PlayerInfo[igrac][pSkin] = GetPlayerSkin(igrac);
PlayerInfo[igrac][pOrgskin] = 283;
SetPlayerSkin(igrac, PlayerInfo[igrac][pOrgskin]);
}
case 2:// LSMD
{
PlayerInfo[igrac][pSkin] = GetPlayerSkin(igrac);
PlayerInfo[igrac][pOrgskin] = 147;
SetPlayerSkin(igrac, PlayerInfo[igrac][pOrgskin]);
}
}
GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
format(szMessage, sizeof(szMessage), "Admin %s vas je postavio za lidera organizacije %s.", szPlayerName, GetOrgNameByID(OrgID));
SendClientMessage(igrac, -1, szMessage);
GetPlayerName(igrac, szPlayerName, MAX_PLAYER_NAME);
format(szMessage, sizeof(szMessage), "Postavio si igraca %s za lidera organizacije %s.", szPlayerName, GetOrgNameByID(OrgID));
SendClientMessage(playerid, -1, szMessage);
}
return 1;
}
Код:
C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(146) : warning 217: loose indentation C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(146) : error 017: undefined symbol "main" C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(153) : error 029: invalid expression, assumed zero C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(153) : error 004: function "SSCANF_OnGameModeInit" is not implemented C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(440) : warning 225: unreachable code C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(440) : error 029: invalid expression, assumed zero C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(440) : error 004: function "S@@_OnGameModeExit" is not implemented C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(445) : warning 225: unreachable code C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(445) : error 029: invalid expression, assumed zero C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(445) : error 004: function "S@@_OnPlayerRequestClass" is not implemented C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(450) : warning 225: unreachable code C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(450) : error 029: invalid expression, assumed zero C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(450) : error 004: function "SSCANF_OnPlayerConnect" is not implemented C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(452) : error 017: undefined symbol "playerid" C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(454) : error 017: undefined symbol "playerid" C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(455) : error 017: undefined symbol "playerid" C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(459) : error 017: undefined symbol "playerid" C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(462) : error 017: undefined symbol "playerid" C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(467) : warning 225: unreachable code C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(467) : error 029: invalid expression, assumed zero C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(467) : error 004: function "SSCANF_OnPlayerDisconnect" is not implemented C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(469) : error 017: undefined symbol "playerid" C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(471) : error 017: undefined symbol "playerid" C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(472) : error 017: undefined symbol "playerid" C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(473) : error 017: undefined symbol "playerid" C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(474) : error 017: undefined symbol "playerid" C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(479) : warning 225: unreachable code C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(479) : error 029: invalid expression, assumed zero C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(479) : error 004: function "S@@_OnPlayerSpawn" is not implemented C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(484) : warning 225: unreachable code C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(484) : error 029: invalid expression, assumed zero C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(484) : error 004: function "S@@_OnPlayerDeath" is not implemented C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(489) : warning 225: unreachable code C:\Documents and Settings\Emrah Kadiric\Desktop\San Fierro\gamemodes\gnrp.pwn(489) : error 029: invalid expression, assumed zero Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 26 Errors.


