SA-MP Forums Archive
[Please Help] /Clothes command 1 error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Please Help] /Clothes command 1 error (/showthread.php?tid=193163)



[Please Help] /Clothes command 1 error - XoSarahMoX - 25.11.2010

This is the command:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	new skinid;
	if(playerid, "/Clothes", skinid)
 	{
	IsPlayerInRangeOfPoint(playerid,10,198.9780,-127.8640,1003.5152);
	{
	SendClientMessage(playerid, COLOR_WHITE, "You Have Changed Into A New Pair Of Clothes");
	SetPlayerSkin(playerid, skinid);
	}
	else
	{
	SendClientMessage(playerid, COLOR_RED, "USAGE: /Clothes [SkinID]!");
	SendClientMessage(playerid, COLOR_RED, "Please Change In The Changing Booth!");
	}
	}
	return 1;
}
This is the error I get when I compile it:
Код:
C:\Users\SoSu\Desktop\SAMP Server\gamemodes\roleplaytraining.pwn(295) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
This is line 295:
Код:
	else
Please help me with this, not sure what the error is .


Re: [Please Help] /Clothes command 1 error - Jacob_Venturas - 25.11.2010

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new skinid;
    if(playerid, "/Clothes", skinid)
    {
        if(IsPlayerInRangeOfPoint(playerid,10,198.9780,-127.8640,1003.5152))
        {
            SendClientMessage(playerid, COLOR_WHITE, "You Have Changed Into A New Pair Of Clothes");
            SetPlayerSkin(playerid, skinid);
        }
        else
        {
            SendClientMessage(playerid, COLOR_RED, "USAGE: /Clothes [SkinID]!");
            SendClientMessage(playerid, COLOR_RED, "Please Change In The Changing Booth!lol penis!");
        }
    }
    return 1;
}
Learn how to use indentations. It makes everything so much easier.