Problem | Command
#1

Hello.
So i got the command /clothes
Код:
if(strcmp(cmd, "/clothes", true) == 0)
  {
  if(IsPlayerConnected(playerid))
	{
  if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 2)
			{
  if (PlayerToPoint(5.0, playerid,1158.2600,-1343.6401,2358.4517))
					{
					ShowMenuForPlayer(Clothes, playerid);
    			TogglePlayerControllable(playerid, 0);
          }
        }
			}
 		}
		return 1;
  		}
And the errors

Код:
C:\Documents and Settings\Yarik\Desktop\CD-Disabler 1.2\one of the best edits\gamemodes\crp.pwn(14869) : warning 209: function "OnPlayerCommandText" should return a value
C:\Documents and Settings\Yarik\Desktop\CD-Disabler 1.2\one of the best edits\gamemodes\crp.pwn(14870) : error 010: invalid function or declaration
C:\Documents and Settings\Yarik\Desktop\CD-Disabler 1.2\one of the best edits\gamemodes\crp.pwn(14874) : error 010: invalid function or declaration
C:\Documents and Settings\Yarik\Desktop\CD-Disabler 1.2\one of the best edits\gamemodes\crp.pwn(14877) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
But if i am deleting the command from the mode every thing is fine
Reply
#2

{ - 4
} - 5
Whats wrong? :P
Reply
#3

well for the first error you forgot a return 1; for the onplaercommandtext callback
Reply
#4

I didnt forgot any return 1;

If i delete the command every thing is fine and no errors when i am adding the command the errors comes i didnt forgot any return and shit.....
Reply
#5

yes u forgot 1 return of the function himself -.-
and if you don't believe than find the problem yourself
Reply
#6

pawn Код:
if(strcmp(cmd, "/clothes", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 2)
        {
            if (PlayerToPoint(5.0, playerid,1158.2600,-1343.6401,2358.4517))
            {
                ShowMenuForPlayer(Clothes, playerid);
                TogglePlayerControllable(playerid, 0);
            }
        }
    }
    return 1;
}
Reply
#7

I didnt forgot anything i checked it myself

anyone else?
Reply
#8

Comon i need it pl0x
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)