22.07.2014, 05:51
Hi, I'm currently trying to start my own GM from scratch. I'm attempted to make a /adjust command for my dynamic factions but I'm currently getting these two errors and one warning. I'm semi-new to pawno so I'd like a little help.
My Code:
And yes I have #include <sccanf2>
Thanks in advanced!
pawn Код:
rptest.pwn(1308) : error 017: undefined symbol "sccanf"
rptest.pwn(1334) : warning 203: symbol is never used: "facid"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
pawn Код:
CMD:adjust(playerid, params[])
{
if(Player[playerid][pFaction] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "You're not in a faction.");
return 1;
}
if(Player[playerid][pLeader] == 1 )
{
new choice[32], opstring[100], query[400], fid;
if(sccanf(params, "s[32]S[100]", choice, opstring))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /adjust [Name]");
SendClientMessage(playerid, COLOR_WHITE, "Avaliable Names: MOTD");
return 1;
}
if(strcmp(choice,"motd",true) == 0)
{
if(!opstring[0])
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /adjust MOTD [MOTD text]");
return 1;
}
if(strlen(opstring) >= 120)
{
SendClientMessage(playerid, COLOR_GRAD1, "That MOTD is too long, please refrain from using more than 120 characters.");
return 1;
}
SendClientMessage(playerid, COLOR_WHITE, "You've adjusted your factions MOTD.");
format(query, sizeof(query), "UPDATE Factions SET MOTD = '%s' WHERE ID = %d", opstring, fid);
mysql_query(query);
return 1;
}
}
return 1;
}
Thanks in advanced!