Tag Mismatch with Sscanf - 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: Tag Mismatch with Sscanf (
/showthread.php?tid=188487)
Tag Mismatch with Sscanf -
PotH3Ad - 07.11.2010
So I converted my gang vehicles and gang weapon saving to sscanf to narrow down the file lines, but I keep getting a tag mismatch error which I can't figure out how to fix. The gang weapon saving/loading is working fine, just the gang vehicles are giving me probs.
Lines giving tag mismatch errors:
pawn Код:
unformat(dini_Get(gfile, key), "p</>ffffd", GangVeh[gangid][x][VehX], GangWeps[gangid][x][VehY], GangWeps[gangid][x][VehZ], GangWeps[gangid][x][VehAng], GangWeps[gangid][x][VehModel]);
pawn Код:
format(str, sizeof(str), "%f/%f/%f/%f/%d", GangVeh[gangid][x][VehX], GangWeps[gangid][x][VehY], GangWeps[gangid][x][VehZ], GangWeps[gangid][x][VehAng], GangWeps[gangid][x][VehModel]); //This line as well
Here is the enum and array:
pawn Код:
enum GANG_VEH
{
VehID,
Float:VehX,
Float:VehY,
Float:VehZ,
Float:VehAng,
VehModel,
VehSpawned
}
new GangVeh[MAX_GANGS][3][GANG_VEH];
Help on this issue would be appreciated.
Re: Tag Mismatch with Sscanf -
LarzI - 07.11.2010
Why rename sscanf - 'unformat' ?
Re: Tag Mismatch with Sscanf -
PotH3Ad - 07.11.2010
****** (sscanf thread): "There is also an alternate function name to avoid confusion with the C standard sscanf"
I just prefer to name it "unformat"...
Re: Tag Mismatch with Sscanf -
The_Moddler - 07.11.2010
Quote:
Originally Posted by LarzI
Why rename sscanf - 'unformat' ?
|
Actually, if you open the sscanf2 include, unformat is already defined as a native.
Quote:
Originally Posted by PotH3Ad
So I converted my gang vehicles and gang weapon saving to sscanf to narrow down the file lines, but I keep getting a tag mismatch error which I can't figure out how to fix. The gang weapon saving/loading is working fine, just the gang vehicles are giving me probs.
Lines giving tag mismatch errors:
pawn Код:
unformat(dini_Get(gfile, key), "p</>ffffd", GangVeh[gangid][x][VehX], GangWeps[gangid][x][VehY], GangWeps[gangid][x][VehZ], GangWeps[gangid][x][VehAng], GangWeps[gangid][x][VehModel]);
pawn Код:
format(str, sizeof(str), "%f/%f/%f/%f/%d", GangVeh[gangid][x][VehX], GangWeps[gangid][x][VehY], GangWeps[gangid][x][VehZ], GangWeps[gangid][x][VehAng], GangWeps[gangid][x][VehModel]); //This line as well
Here is the enum and array:
pawn Код:
enum GANG_VEH { VehID, Float:VehX, Float:VehY, Float:VehZ, Float:VehAng, VehModel, VehSpawned }
new GangVeh[MAX_GANGS][3][GANG_VEH];
Help on this issue would be appreciated.
|
Try this:
pawn Код:
unformat(dini_Int(gfile, key), "p</>ffffd", GangVeh[gangid][x][VehX], GangWeps[gangid][x][VehY], GangWeps[gangid][x][VehZ], GangWeps[gangid][x][VehAng], GangWeps[gangid][x][VehModel]);
Re: Tag Mismatch with Sscanf -
PotH3Ad - 09.11.2010
Same errors still :/
Re: Tag Mismatch with Sscanf -
LarzI - 10.11.2010
Look at the syntax:
unformat(const data[], const format[], {Float,_}:...)
Const data is a string, you're putting an integer there (dini_Int).