[Tutorial] Making a simple PM system with ZCMD & sscanf
#29

CMDm(playerid, params[])
{
new stringpm[128],toid, toname[128];
if(sscanf(params, "us", toid, params)) SendClientMessage(playerid, COLOR_ORANGE, "Correct usage: /pm <id> <message>");
else if(!IsPlayerConnected(toid)) SendClientMessage(playerid, COLOR_ORANGE, "ERROR: Player not connected");
if(playerid == toid) SendClientMessage(playerid, COLOR_ORANGE, "ERROR: You cannot send a PM to yourself!");
else
{
GetPlayerName(toid, toname, sizeof(toname));
format(stringpm, sizeof(stringpm), "PM To %s(%d): %s", playername, toid, params);
SendClientMessage(playerid, COLOR_YELLOW, stringpm);
format(stringpm, sizeof(stringpm), "PM From %s(%d): %s", playername, playerid, params);
SendClientMessage(toid, COLOR_YELLOW, stringpm);
}
return 1;
}



I did this but I keep getting error:

E:\My Server\gamemodes\SARCR.pwn(596) : error 029: invalid expression, assumed zero
E:\My Server\gamemodes\SARCR.pwn(596) : error 017: undefined symbol "cmd_pm"
E:\My Server\gamemodes\SARCR.pwn(596) : error 029: invalid expression, assumed zero
E:\My Server\gamemodes\SARCR.pwn(596) : fatal error 107: too many error messages on one line
Reply


Messages In This Thread
Making a simple PM system with ZCMD & sscanf - by Toni - 31.07.2010, 17:06
Re: Making a simple PM system with ZCMD & sscanf - by Kevin_Joshen - 31.07.2010, 23:59
Re: Making a simple PM system with ZCMD & sscanf - by willsuckformoney - 01.08.2010, 00:21
Re: Making a simple PM system with ZCMD & sscanf - by Kevin_Joshen - 01.08.2010, 00:34
Re: Making a simple PM system with ZCMD & sscanf - by Kar - 01.08.2010, 00:56
Re: Making a simple PM system with ZCMD & sscanf - by willsuckformoney - 01.08.2010, 02:45
Re: Making a simple PM system with ZCMD & sscanf - by hab2ever - 01.08.2010, 12:31
Re: Making a simple PM system with ZCMD & sscanf - by Toni - 01.08.2010, 13:59
Re: Making a simple PM system with ZCMD & sscanf - by M3ntaL - 01.08.2010, 16:30
Re: Making a simple PM system with ZCMD & sscanf - by Sergei - 01.08.2010, 16:35
Re: Making a simple PM system with ZCMD & sscanf - by Toni - 01.08.2010, 16:40
Re: Making a simple PM system with ZCMD & sscanf - by M3ntaL - 01.08.2010, 16:47
Re: Making a simple PM system with ZCMD & sscanf - by Sergei - 01.08.2010, 17:01
Re: Making a simple PM system with ZCMD & sscanf - by Toni - 01.08.2010, 17:30
Re: Making a simple PM system with ZCMD & sscanf - by Sergei - 01.08.2010, 20:02
Re: Making a simple PM system with ZCMD & sscanf - by Toni - 01.08.2010, 20:44
Re: Making a simple PM system with ZCMD & sscanf - by Blades - 18.08.2010, 10:32
Re: Making a simple PM system with ZCMD & sscanf - by Toni - 18.08.2010, 11:06
Re: Making a simple PM system with ZCMD & sscanf - by Blades - 19.08.2010, 08:41
Re: Making a simple PM system with ZCMD & sscanf - by Blades - 08.09.2010, 09:56
Re: Making a simple PM system with ZCMD & sscanf - by PinkFloydLover - 08.09.2010, 11:26
Re: Making a simple PM system with ZCMD & sscanf - by gondes - 19.09.2010, 15:53
Re: Making a simple PM system with ZCMD & sscanf - by Toni - 19.09.2010, 16:01
Re: Making a simple PM system with ZCMD & sscanf - by _rAped - 05.01.2011, 04:28
Re: Making a simple PM system with ZCMD & sscanf - by opik - 06.08.2011, 10:18
Re: Making a simple PM system with ZCMD & sscanf - by mickos - 08.06.2012, 05:12
Re: Making a simple PM system with ZCMD & sscanf - by chuck100 - 14.05.2013, 22:28
Re: Making a simple PM system with ZCMD & sscanf - by Pettersen - 18.05.2013, 17:10
Re: Making a simple PM system with ZCMD & sscanf - by ATGOggy - 30.10.2014, 13:59
Re: Making a simple PM system with ZCMD & sscanf - by Rudy_ - 30.10.2014, 14:01
Re: Making a simple PM system with ZCMD & sscanf - by ATGOggy - 30.10.2014, 14:24
Re: Making a simple PM system with ZCMD & sscanf - by Rudy_ - 30.10.2014, 14:25
Re: Making a simple PM system with ZCMD & sscanf - by ATGOggy - 30.10.2014, 14:30
Re: Making a simple PM system with ZCMD & sscanf - by ATGOggy - 30.10.2014, 17:16
Re: Making a simple PM system with ZCMD & sscanf - by ATGOggy - 31.10.2014, 11:05
Re: Making a simple PM system with ZCMD & sscanf - by Arastair - 08.11.2014, 14:44
Re: Making a simple PM system with ZCMD & sscanf - by antixgaming - 30.04.2018, 13:24

Forum Jump:


Users browsing this thread: 1 Guest(s)