sscanf error: System not initialised.
#1

When type on server /w id of player and text, server say me: KORISTI: /w [playerid/partofname] [text]
on server log have error: sscanf error: System not initialised.

How to fix this?





Code:
CMD:w(playerid, params[])
{
    if(PlayerInfo[playerid][pMuted] == 1)
	{
	SCM(playerid, COLOR_RED, "SERVER: "COL_WHITE"Ne mozete pricati, mutani ste");
	return 1;
	}
	new id, text[35], sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], string[128];
	if(sscanf(params,"uz", id, text)) return SCM(playerid, COLOR_CYAN,"KORISTI: "COL_WHITE"/w [playerid/partofname] [text]");
	if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_RED, "GRESKA: "COL_WHITE"Pogresan ID/NICK.");
	else
	{
	    new Float:x, Float:y, Float:z;
	    GetPlayerPos(id,x,y,z);
	    if(PlayerToPoint(5, playerid, x,y,z))
	    {
	        GetPlayerName(playerid, sendername,sizeof(sendername));
	        GetPlayerName(id, name, sizeof(name));
	        if(id == playerid)
	        {
	            format(string,sizeof(string),"*%s nesto sapce.", sendername);
	            ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			}
			else
			{
			    format(string,sizeof(string),"*%s nesto sapce %s-u", sendername, name);
			    ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			}
			format(string, sizeof(string), "%s-u sapces: %s", sendername, text);
			SendClientMessage(id, COLOR_YELLOW3, string);
			format(string, sizeof(string), "%s sapce: %s", sendername, text);
			SendClientMessage(playerid,  COLOR_YELLOW3, string);
		}
		else return SCM(playerid, COLOR_RED,"GRESKA: "COL_WHITE"Taj igrac nije blizu tebe.");
	}
	return 1;
}
Reply
#2

Quote:
Originally Posted by Y_Less
View Post
  • 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.
Also change:
pawn Code:
if(sscanf(params,"uz", id, text))
to:
pawn Code:
if(sscanf(params,"us[35]", id, text))
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)