unknown command?
#1

i have job script from other peoples and when i type /takejob ingame, it will start job but it will also say "unknown command" rite after. i never happen in 0.3d only 0.3e. how to fix? this is my code:

pawn Код:
YCMD:takejob(playerid,params[],help)
{
#pragma unused help
#pragma unused params
new id = GetJobID(playerid);
if(id == -1) return SCM(playerid,COLOR_RED,"ERROR: You Are Not Near Any Job Opportunities.");
if(P_Data[playerid][pJob] != 0) return SCM(playerid,COLOR_RED,"ERROR: You Already Have A Job!");
SendFormatMSG(playerid,-1,"You Have Joined The Job {E0941B}%s. Type /startjob To Start The Job.",Job[id][Name]);
P_Data[playerid][pJob] = id;
return 1;
}
Reply
#2

i had to remove the OnPlayerCommandText callback from my gamemode to stop this.

try that and see.
Reply
#3

Quote:
Originally Posted by Jonny5
Посмотреть сообщение
i had to remove the OnPlayerCommandText callback from my gamemode to stop this.

try that and see.
i dont have that anywhere in gamemode or filterscript. no Onplayercommandtext.
Reply
#4

Look for no closed brackets "{}"
Reply
#5

Quote:
Originally Posted by [LvZ]Free
Посмотреть сообщение
Look for no closed brackets "{}"
no all brackets are gooddd. idk why? pls help?
Reply
#6

do you have OnPlayerCommandPerformed or OnPlayerCommandRecieved?
if you have post here maybe i help?
Reply
#7

pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessage(playerid,COLOR_WHITE, "Unknown command!");
    return 1;
}
Reply
#8

pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) return SendClientMessage(playerid,COLOR_WHITE, "Unknown command!");
    return 1;
}
Reply
#9

Quote:
Originally Posted by Romel
Посмотреть сообщение
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) return SendClientMessage(playerid,COLOR_WHITE, "Unknown command!");
    return 1;
}
no the same thing happen
Reply
#10

What's the point of YCMD:takejob(playerid,params[],help) ... help here?
And the point of #pragma unused help this ? I mean u don't use "help" anywhere...
sorry for my stupid question

I ask for the brackets beacuz if you don't close it, u will return something diffrent from the real
.. Try to remove this if(!success) return SendClientMessage(playerid,COLOR_WHITE, "Unknown command!"); ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)