dcmd_adcia(playerid,params[])
{
new string[128];
new ID;
if(sscanf(params,"ui",ID))
{
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /adcia (Player Name/ID)");
return 1;
}
if(!IsPlayerConnected(ID))
{
format(string,sizeof(string),"The player ID (%d) is not connected to the server. You cannot give them CIA status.",ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
if(PLAYERLIST_authed[ID] != 1)
{
format(string,sizeof(string),"%s(%d) is not logged into to the server. You must wait till they login before you give them CIA status.",PlayerName(ID),ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
if(CanUseCIA[ID] == 1337)
{
format(string,sizeof(string),"%s(%d) is already a CIA member.",PlayerName(ID),ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
format(string,sizeof(string),"[ADMIN CIA] Administrator has given %s(%d) CIA status.",PlayerName(ID),ID);
SendClientMessageToAll(COLOR_ADMIN,string);
SendClientMessage(ID,COLOR_ADMIN,"You have been given CIA status by a Server Administrator. Congratulations.");
CanUseCIA[ID] =1337;
format(string,sizeof(string),"9[ADMIN CIA] Administrator has given %s(%d) CIA status.",PlayerName(ID),ID);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
dcmd_adcia(playerid,params[])
{
new string[128];
new ID;
if(sscanf(params,"u",ID))
{
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /adcia (Player Name/ID)");
return 1;
}
if(!IsPlayerConnected(ID))
{
format(string,sizeof(string),"The player ID (%d) is not connected to the server. You cannot give them CIA status.",ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
if(PLAYERLIST_authed[ID] != 1)
{
format(string,sizeof(string),"%s(%d) is not logged into to the server. You must wait till they login before you give them CIA status.",PlayerName(ID),ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
if(CanUseCIA[ID] == 1337)
{
format(string,sizeof(string),"%s(%d) is already a CIA member.",PlayerName(ID),ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
format(string,sizeof(string),"[ADMIN CIA] Administrator has given %s(%d) CIA status.",PlayerName(ID),ID);
SendClientMessageToAll(COLOR_ADMIN,string);
SendClientMessage(ID,COLOR_ADMIN,"You have been given CIA status by a Server Administrator. Congratulations.");
CanUseCIA[ID] =1337;
format(string,sizeof(string),"9[ADMIN CIA] Administrator has given %s(%d) CIA status.",PlayerName(ID),ID);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
In sscanf "ui" change it to "u"
pawn Код:
|
dcmd_adcia(playerid,params[])
{
printf("adcia: %s", params);
new ID, string[128];
if(sscanf(params,"u",ID)) return SendClientMessage(playerid,COLOR_ERROR,"USAGE: /adcia (Player Name/ID)");
if(!IsPlayerConnected(ID) || ID == INVALID_PLAYER_ID)
{
format(string,sizeof(string),"The player ID (%d) is not connected to the server. You cannot give them CIA status.", ID);
return SendClientMessage(playerid,COLOR_ERROR,string);
}
if(PLAYERLIST_authed[ID] != 1)
{
format(string,sizeof(string),"%s(%d) is not logged into to the server. You must wait till they login before you give them CIA status.",PlayerName(ID),ID);
return SendClientMessage(playerid,COLOR_ERROR,string);
}
if(CanUseCIA[ID] == 1337)
{
format(string,sizeof(string),"%s(%d) is already a CIA member.",PlayerName(ID),ID);
return SendClientMessage(playerid,COLOR_ERROR,string);
}
format(string,sizeof(string),"[ADMIN CIA] Administrator has given %s(%d) CIA status.",PlayerName(ID),ID); SendClientMessageToAll(COLOR_ADMIN,string);
SendClientMessage(ID,COLOR_ADMIN,"You have been given CIA status by a Server Administrator. Congratulations.");
CanUseCIA[ID] =1337;
format(string,sizeof(string),"9[ADMIN CIA] Administrator has given %s(%d) CIA status.",PlayerName(ID),ID); IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
pawn Код:
|
[21:33:49] adcia: [21:33:49] sscanf error: System not initialised. [21:33:51] adcia: 0 [21:33:51] sscanf error: System not initialised.
sscanf error: System not initialised.
If you get this error, you need to make sure that you have recompiled ALL your scripts using the LATEST version of "sscanf2.inc". Older versions didn't really require this as they only had two natives - "sscanf" and "unformat", the new version has some other functions - you don't need to worry about them, but you must use "sscanf2.inc" so that they are correctly called. If you think you have done this and STILL get the error then try again - make sure you are using the correct version of PAWNO for example. |
Original post by ****** , also take a look at the sscanf plugin your problem on sscanf plugin or include https://sampforum.blast.hk/showthread.php?tid=120356
|