Error in a command
#1

sscanf warning: Strings without a length are deprecated, please add a destination size.


Код:
COMMAND:label(playerid,params[])
{
if (APlayerData[playerid][PlayerLevel] >= 7)
{
new string[160],Float: X, Float: Y, Float: Z,text[100],distance,color;
GetPlayerPos(playerid, X,Y,Z);
if(sscanf(params,"sxd",text,color,distance)) return SendClientMessage(playerid,0xFB9204FF,"USAGE: /label [text] [color] [distance]");
Create3DTextLabel(text,color,X,Y,Z,distance,GetPlayerVirtualWorld(playerid));
format(string,sizeof(string),"Create3DTextLabel(\"%s\",color,%f, %f, %f,%d,%d);",text,X,Y,Z,distance,GetPlayerVirtualWorld(playerid));
SaveToLog("labels",string);
}
return 1;
}
Reply


Messages In This Thread
Error in a command - by DerickClark - 17.03.2013, 02:17
Re: Error in a command - by Scrillex - 17.03.2013, 02:23
Re: Error in a command - by DerickClark - 17.03.2013, 02:32
Re: Error in a command - by Scrillex - 17.03.2013, 02:33

Forum Jump:


Users browsing this thread: 1 Guest(s)