sscanf problem - 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 problem (
/showthread.php?tid=619884)
sscanf problem -
Karolukas123 - 23.10.2016
Hello, i try load information but its...not working normal. its showing on Title my name, Owner not working else is good
Код:
mysql_fetch_field_row(PropIDStr, "pIndeficationID"); PropID = strval(PropIDStr);
sscanf(Query, "p<|>{ds[80]}s[24]dd",
PropertySystem[PropID][pTitle],
PropertySystem[PropID][pOwner],
PropertySystem[PropID][pPrice],
PropertySystem[PropID][pEarning]);
format(String, sizeof(String), "%s %s %d %d",
PropertySystem[PropID][pTitle], PropertySystem[PropID][pOwner], PropertySystem[PropID][pPrice], PropertySystem[PropID][pEarning]);
Re: sscanf problem -
Stinged - 23.10.2016
According to
"p<|>{ds[80]}s[24]dd", your line should look like this:
INTEGER|STRING|STRING|INTEGER|INTEGER
And since you're using {ds[80]} for the first two, it means you're dumping them (The red part)
But according to your code, you're storing 4 things, and not 3.
Re: sscanf problem -
Karolukas123 - 23.10.2016
so how my code must look ?? "p<|>{d}s[80]s[24]dd" ??
Re: sscanf problem -
Karolukas123 - 23.10.2016
so.. i don't get it.. still
Re: sscanf problem -
Gammix - 23.10.2016
In sscanf:
"
p<|>s[80]s[24]dd"
In format:
"
%s|%s|%d|%d"
Re: sscanf problem -
Karolukas123 - 24.10.2016
same..