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: 823
Reputation: 34
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,810
Reputation: 296
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;
}
__________________
I stopped playing stunt servers long time ago and decided to enter the RolePlay servers and roleplay with it, You would find me playing in P:LA or in any popular servers, edit or not, My roleplay name would be always Ronald_Lacson.


When on UN-RP servers, My username would be always Jake_Hero, If you want to add me on Skype, the ID would be, spencer_

I need a user who can let me use JakAdmin 3.2.2 on their servers, I am glad if someone will let me, It's not that i will steal anything - You're the one who'll upload the Beta Script.
_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: 823
Reputation: 34
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,810
Reputation: 296
Default Re: UNKNOWN COMMAND - WORKED BUT ERROR

Remove the return from the CallRemoteFunction
then under the CallRemoreFunction put return 1;
__________________
I stopped playing stunt servers long time ago and decided to enter the RolePlay servers and roleplay with it, You would find me playing in P:LA or in any popular servers, edit or not, My roleplay name would be always Ronald_Lacson.


When on UN-RP servers, My username would be always Jake_Hero, If you want to add me on Skype, the ID would be, spencer_

I need a user who can let me use JakAdmin 3.2.2 on their servers, I am glad if someone will let me, It's not that i will steal anything - You're the one who'll upload the Beta Script.
_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: 823
Reputation: 34
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 09:49 AM.


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