SERVER: UNKOWN COMMAND -
BpX - 25.06.2013
Hello everyone, Help me out please. "SERVER: UNKNOWN COMMAND" keeps appearing when I type one of my commands.
pawn Код:
dcmd_getv(playerid,params[])
{
new Index;
new tmp[128]; tmp = strtok(params,Index);
if(!strlen(tmp)) return
SendClientMessage(playerid, COLOUR_RED, "Usage: {FFFFFF}/getv [Vehicle ID]");
new veh = strval(tmp);
if(!IsValidVehicle(veh)) return Error(playerid, 5);
new Float:X,Float:Y,Float:Z;
new Float:Angle,int1,virt;
new str[128];
GetPlayerPos(playerid, X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);
virt = GetPlayerVirtualWorld(playerid);
int1 = GetPlayerInterior(playerid);
SetVehiclePos(veh, X,Y,Z);
SetVehicleZAngle(veh, Angle);
LinkVehicleToInterior(veh, int1);
SetVehicleVirtualWorld(veh, virt);
PutPlayerInVehicle(playerid, veh, 0);
format(str, sizeof(str), "|-_ You Have Teleported Vehicle ID: %d - Name: %s To Your Position _-|", veh, VehicleNames[veh - 400]);
SendClientMessage(playerid, COLOUR_BLUE, str);
return 1;
}
The command works, I get my vehicle. But the last SendClientMessage was not carry out, instead saying "SERVER: UNKNOWN COMMAND". What can be the problem?
Thanks
Re: SERVER: UNKOWN COMMAND -
BpX - 26.06.2013
Help me please? I think the script stops at this line
pawn Код:
format(str, sizeof(str), "|-_ You Have Teleported Vehicle ID: %d - Name: %s To Your Position _-|", veh, VehicleNames[veh - 400]);
Anyone knows why?
AW: SERVER: UNKOWN COMMAND -
Skimmer - 26.06.2013
Be sure you have this command on OnPlayerCommandText and the length is right
Re: SERVER: UNKOWN COMMAND -
BpX - 26.06.2013
Yes the length is correct. But it still does not work
Re: SERVER: UNKOWN COMMAND -
iJumbo - 26.06.2013
Return 0 in OnPlayerCommandText
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(getv, 4, cmdtext);
return 0;
}
Re: SERVER: UNKOWN COMMAND -
BpX - 26.06.2013
Yes, I do have return 0; However it still shows 'SERVER: UNKOWN COMMAND". I believe its still the format line. Thanks for helping anyway. Anyone else knows how to fix it?
Re: SERVER: UNKOWN COMMAND -
iJumbo - 26.06.2013
Check all your FILTERSCRIPTS and other commands in gm have the right return ..
Re: SERVER: UNKOWN COMMAND -
IperFexoK - 26.06.2013
Maybe you have some filterscript that makes contact, try to remove all the filterscripts.
PS: Sorry my bad english з_з.
Re: SERVER: UNKOWN COMMAND -
BpX - 26.06.2013
I don't have any other filtersricpts, but yet this always come back. The command works, however it mysteriouslly stops at the format line.
Re: SERVER: UNKOWN COMMAND -
Jefff - 26.06.2013
pawn Код:
dcmd_getv(playerid,params[])
{
if(isnull(params)) return SendClientMessage(playerid, COLOUR_RED, "Usage: {FFFFFF}/getv [Vehicle ID]");
new veh = strval(params);
if(!IsValidVehicle(veh)) return Error(playerid, 5);
new str[128];
new Float:posX,Float:posY,Float:posZ,Float:Angle,Interior,VirtualWorld,VehModel;
GetPlayerPos(playerid,posX,posY,posZ);
GetPlayerFacingAngle(playerid,Angle);
VehModel = GetVehicleModel(veh);
Interior = GetPlayerInterior(playerid);
VirtualWorld = GetPlayerVirtualWorld(playerid);
SetVehiclePos(veh,posX,posY,posZ);
SetVehicleZAngle(veh,Angle);
LinkVehicleToInterior(veh,Interior);
SetVehicleVirtualWorld(veh,VirtualWorld);
PutPlayerInVehicle(playerid,veh,0);
format(str, sizeof(str), "|-_ You Have Teleported Vehicle ID: %d - Name: %s To Your Position _-|", veh, VehicleNames[VehModel - 400]);
return SendClientMessage(playerid, COLOUR_BLUE, str);
}