SA-MP Forums Archive
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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: sscanf problem (/showthread.php?tid=264341)



sscanf problem - Willow - 25.06.2011

Hi, just fixed a problem and heres another...

So this time the problem is sscanf..

The code:

Код:
sscanf(string, "d", i,
            HD[i][ID] = i);
            sscanf(string, "p<|>ds[24]dffffffddddd",HD[i][ID],
            HD[i][owner],
            HD[i][price],
            HD[i][exteriorX],
            HD[i][exteriorY],
            HD[i][exteriorZ],
            HD[i][interiorX],
            HD[i][interiorY],
            HD[i][interiorZ],
            HD[i][interiorInt],
            HD[i][locked],
            HD[i][gunslot1],
            HD[i][locklevel],
            HD[i][safeamount]);

			if(strlen(HD[i][owner]) > 0) CreatePickup(1273, 1, HD[i][exteriorX], HD[i][exteriorY], HD[i][exteriorZ], -1);
			else CreatePickup(1272, 1, HD[i][exteriorX], HD[i][exteriorY], HD[i][exteriorZ], -1);
			printf("House %d created at x: %f, y: %f, z: %f, locklevel: %d", i, HD[i][exteriorX], HD[i][exteriorY], HD[i][exteriorZ], HD[i][locklevel]);
Houses creats with everything 0 ... Is there something wrong in my code ? Is the sscanf correct? MySQL doesn't give any errors.