[HELP] Sscanf warning: Strings without a length are deprecated, please add a destination size. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] Sscanf warning: Strings without a length are deprecated, please add a destination size. (
/showthread.php?tid=602230)
[HELP] Sscanf warning: Strings without a length are deprecated, please add a destination size. -
KONTROWKEN - 04.03.2016
Код:
Sscanf warning: Strings without a length are deprecated, please add a destination size.
Код:
//Etkinlik
dcmd_etkbaslat(playerid, params[])
{
new
etkName[200],katilimsurebelirle,string[500];
if((Oyuncu[playerid][p_adminlevel] >= 1 || Oyuncu[playerid][p_animlevel] >= 2) || IsPlayerAdmin(playerid))HataMesaj(playerid,"Katilim bitme suresini 30-60 arasinda giriniz!");
if(sscanf(params, "sd",etkName, katilimsurebelirle)) SendClientMessage(playerid,-1,""hw"~ Etkinlik ~ "wh"/etkbaslat <etk ismi> <katilim bitme suresi>");
else if(katilimsurebelirle > MAX_KATILIMSURE) HataMesaj(playerid,"Katilim bitme suresini 30-60 arasinda giriniz!");
else if(katilimsurebelirle < MIN_KATILIMSURE) HataMesaj(playerid,"Katilim bitme suresini 30-60 arasinda giriniz!");
else if(e_Basladi == 1) SendClientMessage(playerid,-1,""hw"~ Etkinlik ~ "wh"Zaten bir etkinlik duzenleniyor!");
else {
GetPlayerPos (playerid, e_Pos[0], e_Pos[1], e_Pos[2]) ;
GetPlayerFacingAngle(playerid, e_Pos[3]);
e_INT = GetPlayerInterior(playerid);
e_World = GetPlayerVirtualWorld(playerid);
format(string, sizeof string, ""hw"~ Etkinlik ~ "wh"%s etkinligi basladi, katilmak icin /etkgit, %d saniye sonra katilim bitecek!",etkName[0],katilimsurebelirle);
SendClientMessageToAll(-1, string);
SetTimer("katilimBitir", katilimsurebelirle * 1000, false);
e_Basladi = 1;
}
#if defined ETK_LOG
printf("%s isimli etkinlik %s tarafindan baslatildi, katilim bitis suresi: %d",etkName[0],PlayerName(playerid),katilimsurebelirle);
#endif
return 1;
}
Re: [HELP] Sscanf warning: Strings without a length are deprecated, please add a destination size. -
adammal - 04.03.2016
if(sscanf(params, "s[200]d",etkName, katilimsurebelirle))
Re: [HELP] Sscanf warning: Strings without a length are deprecated, please add a destination size. -
KONTROWKEN - 04.03.2016
Quote:
Originally Posted by adammal
if(sscanf(params, "s[200]d",etkName, katilimsurebelirle))
|
Thanks Bro.