SA-MP Forums Archive
sscanf warning... - 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: sscanf warning... (/showthread.php?tid=401438)



sscanf warning... - Kyle - 22.12.2012

http://pastebin.com/Q1zXj9K5

Why the hell does that sscanf buffer overflow when there is plenty of space?

Also why doesn't it enter the if statement when the statement is correct, along with the data...

Thanks


Re: sscanf warning... - stabker - 22.12.2012

try

pawn Код:
if(!sscanf(strstringer,"p<,>s[24]fffdd",DrugPlants[playerid][d][DrugOwner], DrugPlants[playerid][d][DrugPositionX], DrugPlants[playerid][d][DrugPositionY], DrugPlants[playerid][d][DrugPositionZ], DrugPlants[playerid][d][DrugSize], DrugPlants[playerid][d][DrugFertilized]))



Re: sscanf warning... - Kyle - 22.12.2012

Quote:
Originally Posted by stabker
Посмотреть сообщение
try

pawn Код:
if(!sscanf(strstringer,"p<,>s[24]fffdd",DrugPlants[playerid][d][DrugOwner], DrugPlants[playerid][d][DrugPositionX], DrugPlants[playerid][d][DrugPositionY], DrugPlants[playerid][d][DrugPositionZ], DrugPlants[playerid][d][DrugSize], DrugPlants[playerid][d][DrugFertilized]))
Tyvm