Problem | Command - 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: Problem | Command (
/showthread.php?tid=87670)
Problem | Command -
[Sk]Noob - 21.07.2009
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
Re: Problem | Command -
Jefff - 21.07.2009
{ - 4
} - 5
Whats wrong? :P
Re: Problem | Command -
Pawno_Master - 21.07.2009
well for the first error you forgot a return 1; for the onplaercommandtext callback
Re: Problem | Command -
[Sk]Noob - 21.07.2009
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.....
Re: Problem | Command -
Pawno_Master - 21.07.2009
yes u forgot 1 return of the function himself -.-
and if you don't believe than find the problem yourself
Re: Problem | Command -
MadeMan - 21.07.2009
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;
}
Re: Problem | Command -
[Sk]Noob - 21.07.2009
I didnt forgot anything i checked it myself
anyone else?
Re: Problem | Command -
[Sk]Noob - 21.07.2009
Comon i need it pl0x