SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 13/08/2012, 10:23 AM   #1
nGen.SoNNy
Gangsta
 
nGen.SoNNy's Avatar
 
Join Date: Sep 2009
Location: Vaslui, Romania
Posts: 894
Reputation: 52
Question UNKNOWN COMMAND - WORKED BUT ERROR

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 Code:
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 Code:
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 );
}
__________________
If i've helped you, please click
nGen.SoNNy is offline   Reply With Quote
Old 13/08/2012, 10:51 AM   #2
_Jake_
High-roller
 
_Jake_'s Avatar
 
Join Date: Apr 2012
Location: Land of Ooo
Posts: 2,899
Reputation: 318
Default Re: UNKNOWN COMMAND - WORKED BUT ERROR

Edit: Fail

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

pawn Code:
if(!sucess) return //do whatever you want here

put it here

pawn Code:
public OnPlayerCommandPerformed(playerid, cmdtext[], sucess)
{
    return 1;
}
__________________
JaKe's Stunt/DM/Race/Freeroam/Minigame COMING SOON

I am current looking for mapper who can map things such as stunts, parkour, racing maps and others for FREE, I am not paying dollars but the mapper would received premium points, staff position on the server.

If you think you are suitable enough and are willing to help me out, Please private message me about it ( SAMP Forum )

JakAdmin 3.3 IN-DEVELOPMENT ( PAUSED, BUT ALMOST DONE. )

Jake Hero

94.23.108.103
" JaKe's Test Server "
_Jake_ is offline   Reply With Quote
Old 13/08/2012, 10:58 AM   #3
nGen.SoNNy
Gangsta
 
nGen.SoNNy's Avatar
 
Join Date: Sep 2009
Location: Vaslui, Romania
Posts: 894
Reputation: 52
Default Re: UNKNOWN COMMAND - WORKED BUT ERROR

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 Code:
return CallLocalFunction("OnPlayerExitHouse", "dd", playerid, pos);

I'm a little bit angry and i lost my mind on this easy thing..,
__________________
If i've helped you, please click
nGen.SoNNy is offline   Reply With Quote
Old 13/08/2012, 11:19 AM   #4
_Jake_
High-roller
 
_Jake_'s Avatar
 
Join Date: Apr 2012
Location: Land of Ooo
Posts: 2,899
Reputation: 318
Default Re: UNKNOWN COMMAND - WORKED BUT ERROR

Remove the return from the CallRemoteFunction
then under the CallRemoreFunction put return 1;
__________________
JaKe's Stunt/DM/Race/Freeroam/Minigame COMING SOON

I am current looking for mapper who can map things such as stunts, parkour, racing maps and others for FREE, I am not paying dollars but the mapper would received premium points, staff position on the server.

If you think you are suitable enough and are willing to help me out, Please private message me about it ( SAMP Forum )

JakAdmin 3.3 IN-DEVELOPMENT ( PAUSED, BUT ALMOST DONE. )

Jake Hero

94.23.108.103
" JaKe's Test Server "
_Jake_ is offline   Reply With Quote
Old 13/08/2012, 11:46 AM   #5
nGen.SoNNy
Gangsta
 
nGen.SoNNy's Avatar
 
Join Date: Sep 2009
Location: Vaslui, Romania
Posts: 894
Reputation: 52
Default Re: UNKNOWN COMMAND - WORKED BUT ERROR

I said: "And i found the problem... i have to remove that return" ....
__________________
If i've helped you, please click
nGen.SoNNy is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SERVER:UNKNOWN COMMAND error ttloko2 Scripting Help 19 26/01/2012 11:56 PM
server:unknown Error When There is an Command. HayZatic Help Archive 2 07/07/2011 12:13 AM
[ERROR] HELP ME! UNKNOWN COMMAND... Jack321 Help Archive 4 30/01/2010 11:25 PM
[HELP] Unknown Command Error kevin974 Help Archive 20 29/08/2009 05:05 PM
Error: Unknown command Antonio [G-RP] Help Archive 3 12/08/2009 05:33 AM


All times are GMT. The time now is 03:11 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.