sscanf
#1

if (sscanf(idx, "uz", giveplayerid, msg)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /pm [playerid/part of name] [message]");

whats wrong with this line??

Код:
new cmd[256];
	new idx;
	cmd = strtok(cmdtext, idx);
	if(strcmp(cmd, "/pm", true) == 0)
	{
	new
		giveplayerid,
		msg;
	if (sscanf(idx, "us", giveplayerid, msg)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /pm [playerid/part of name] [message]");
	else if (giveplayerid == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
	else
	{
        //pm code
	}
	return 1;
	}
	return 0;
}
Reply


Messages In This Thread
sscanf - by legodude - 11.07.2010, 18:55
Re: sscanf - by Carlton - 11.07.2010, 18:56
Re: sscanf - by MadeMan - 11.07.2010, 18:57
Re: sscanf - by legodude - 11.07.2010, 19:00
Re: sscanf - by MadeMan - 11.07.2010, 19:17
Re: sscanf - by legodude - 11.07.2010, 19:28
Re: sscanf - by selten98 - 11.07.2010, 22:07

Forum Jump:


Users browsing this thread: 1 Guest(s)