UNKNOWN COMMAND - WORKED BUT ERROR
#1

Hi all! If i type this command... i will buy the house but i will get the msg: unknown command... so.. (succes = 0 ) .. Can you help me?


pawn Код:
if( success == 0)Info( playerid, "~r~~h~Unknown Command!~n~~n~~w~These commands may help you~n~~g~~h~/help /cmds /teles /rules /credits",6000 );

pawn Код:
CMD:exithouse(playerid, params[])
{
    new pos = IsPlayerInRangeOfHouseEx(playerid);
    if(IsPlayerInRangeOfHouseEx(playerid))
    {
        SetPlayerInterior(playerid, 0);
        SetPlayerVirtualWorld(playerid, 0);
        SetPlayerPos(playerid, HouseEnterX[playerid], HouseEnterY[playerid], HouseEnterZ[playerid]);
        return CallLocalFunction("OnPlayerExitHouse", "dd", playerid, pos);
    }
    else SendError(playerid, "You have to be in someone House!");
    return ( 1 );
}
Reply
#2

Edit: Fail

no, not success == 0
it must be like this

pawn Код:
if(!sucess) return //do whatever you want here
put it here

pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], sucess)
{
    return 1;
}
Reply
#3

my problem is on that command not my command check i'm using that function on OnPlayerCommandPerformed
And i found the problem... i have to remove that return from
pawn Код:
return CallLocalFunction("OnPlayerExitHouse", "dd", playerid, pos);
I'm a little bit angry and i lost my mind on this easy thing..,
Reply
#4

Remove the return from the CallRemoteFunction
then under the CallRemoreFunction put return 1;
Reply
#5

I said: "And i found the problem... i have to remove that return" ....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)