Quote:
Originally Posted by [ABK]Antonio
pawn Код:
// Let's say we have a file that contains // HouseInt, HousePrice, HouseOutsideX, HouseOutsideY, HouseOutsideZ
// The string looks like this when we get it back; "0|50000|23.0000|123.0000|1.0000"
// We can use the quiet function of sscanf to only get what we currently want (for whatever reason) new Float:X,Float:Y,Float:Z; sscanf(file_string, "p<|>{i}{i}fff", X,Y,Z);
// Now our X Y Z variables will be set to the proper values. // Let's say we wanted to load the pickups or CPs for entering the house // in a different function than where we set the textlabels data. // That would be one use of this function
It's good if you want to load separate things at separate times even though they're contained in the same file.
|
This would not be the same as my code ?:
pawn Код:
new var,var2;
sscanf("20 30 50", "ii", var,var2);
printf("%i %i", var,var2);