Sscanf warning: Strings without a length are deprecated, please add a destination size.
#1

Код:
dcmd_local(playerid, params[])
{
		new ism[300];
		new msg[300];
		new string[400];
		GetPlayerName(playerid,ism,sizeof(ism));
		if(sscanf(params, "sbh", msg)) return BilgiMesaj(playerid,"{FFFFFF}Kullanımı {99FF00}/local [Mesajınız]");
		if(strlen(msg) < 1 || strlen(msg) > 300) return HataMesaj(playerid,"Mesajın зok uzun veya зok kısa.!!!");
		format(string,sizeof(string),"{FFFFFF}[{00A8FF}LOCAL{FFFFFF}] {00A8FF}%s : {FFFFFF}%s", ism, msg);
        printf("[LOCAL]%s: %s",ism,msg);
new
      Float: pPos[3]
   ;
   GetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]);

   for(new i, j = GetMaxPlayers(); i != j; ++i)
   {
      if(IsPlayerConnected(i) && !IsPlayerNPC(i))
      {
     if(IsPlayerInRangeOfPoint(i, 50.0, pPos[0], pPos[1], pPos[2]))
         {
		 SendClientMessage(i, COLOR_WHITE, string);
         }
	  }
   }
		return 1;
}
dcmd_l(playerid, params[])
{
	return dcmd_local(playerid, params);
}
Reply
#2

Have you read the actual error...? What do you think it means?
Reply
#3

Change this
Код:
if(sscanf(params, "sbh", msg))
To:

Код:
if(sscanf(params, "s[300]", msg))
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)