28.02.2013, 11:56
pawn Код:
[22:38:04] sscanf warning: No default value found.
[22:38:04] sscanf warning: Unknown format specifier '[', skipping.
[22:38:04] sscanf warning: Unknown format specifier '2', skipping.
[22:38:04] sscanf warning: Unknown format specifier '0', skipping.
[22:38:04] sscanf warning: Unknown format specifier ']', skipping.
[22:38:04] sscanf warning: Format specifier does not match parameter count.
[22:38:07] sscanf warning: No default value found.
[22:38:16] sscanf warning: No default value found.
pawn Код:
CMD:clan(playerid, params[])
{
new sub[3][20];
if(sscanf(params, "s[20]S[20]", sub[0], sub[1])) return Message2(playerid, Red, "/Clan [Create/Remove/Invite/Join/Leave/Kick/Skin/DSkin/Mute/UnMute/"white"Help"red"]");
if(!strcmp(sub[0], "create", true))
{
new newclan[48];
if(DOF2_GetInt(PFile(playerid), "HaveClan") == 1) return Message(playerid, Red, "[Clan Message]: [%s] .יש לך כבר קלאן קיים", GetPlayerClan(playerid));
if(AC_GetMoney(playerid) < ClanPrice) return Message(playerid, Red, "[Clan Message]: [%s$] .אין לך מספיק כסף בכדי ליצור קלאן", GetNum(ClanPrice));
if(sscanf(sub[1], "s[40]", ClanName)) return Message2(playerid, Red, "[Clan Message]: /ClanCreate [Clan Name]");
format(newclan, 48, "Clans/%s.ini", ClanName);
if(DOF2_FileExists(newclan)) return Message(playerid, Red, "[Clan Message]: .\"%s\" קיים קלאן בשם", ClanName);
DOF2_CreateFile(newclan);
DOF2_SetString(newclan, "Founder", GetName(playerid));
DOF2_SetInt(newclan, "Players", 1);
DOF2_SetString(newclan, "Date", GetDateEx());
DOF2_SetString(newclan, "Time", GetTimeEx());
DOF2_SetInt(newclan, "Bank", 0);
DOF2_SetInt(newclan, "Chat", 0);
DOF2_SetInt(PFile(playerid), "HaveClan", 1);
DOF2_SetString(PFile(playerid), "Clan", ClanName);
DOF2_SetInt(PFile(playerid), "ClanLevel", 6);
DOF2_SetString(PFile(playerid), "ClanTag", "Founder");
DOF2_SaveFile();
AC_GiveMoney(playerid, -ClanPrice);
Message(playerid, Pink, "[Clan Message]: /ClanHelp לעזרה במערכת הקש .\"%s\" מזל טוב ! יצרת קלאן חדש בשם", ClanName);
return true;
}
else if(!strcmp(sub[0], "skin", true))
{
if(sscanf(sub[1],"i",id)) return Message2(playerid,Red,"/Clan Skin [id]");
SetPlayerSkin(playerid, id);
return true;
}
else if(!strcmp(sub[0], "setlevel", true))
{
new level;
if(sscanf(sub[1], "ud", id, level)) return Message2(playerid, Red, "/Clan SetLevel [id] [level]");
SetPlayerSkin(id, level);
return true;
}
return Message2(playerid, Red, "/Clan [Create/Remove/Invite/Join/Leave/Kick/Skin/DSkin/Mute/UnMute/"white"Help"red"]");
}