error /20 command
#2

I'm not quite sure if this is the problem, but it is bad practice to assign a numeric value as a command name, even in zcmd I don't think it handles it very well, maybe call the command

Код:
CMD:twenty(playerid,params[])
{
   GetPlayer2DZone(playerid,Loc,sizeof(Loc));
   new string[64];
   format(string,sizeof(string),"My 10-20 is %s [Location]", Loc);
   SendPlayerMessageToAll(playerid,string);
   return 1;
}
commands are also not case sensitive inside SA-MP, but it's best to leave them completely lowercase when creating them.

I also don't see where you've created the variable Loc, You don't need to make it globally scoped, I'd recommend just adding it at the top of the command.

Here:

pawn Код:
CMD:twenty(playerid,params[])
{
   new Loc;
   GetPlayer2DZone(playerid,Loc,sizeof(Loc));
   new string[64];
   format(string,sizeof(string),"My 10-20 is %s [Location]", Loc);
   SendPlayerMessageToAll(playerid,string);
   return 1;
}
Reply


Messages In This Thread
error /20 command - by DerickClark - 12.05.2013, 01:35
Re: error /20 command - by Hoborific - 12.05.2013, 01:37
Re: error /20 command - by feartonyb - 12.05.2013, 01:45
Re: error /20 command - by DerickClark - 12.05.2013, 01:50

Forum Jump:


Users browsing this thread: 1 Guest(s)