Tag Mismatch with Sscanf
#1

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.
Reply
#2

Why rename sscanf - 'unformat' ?
Reply
#3

****** (sscanf thread): "There is also an alternate function name to avoid confusion with the C standard sscanf"

I just prefer to name it "unformat"...
Reply
#4

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]);
Reply
#5

Same errors still :/
Reply
#6

Look at the syntax:

unformat(const data[], const format[], {Float,_}:...)

Const data is a string, you're putting an integer there (dini_Int).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)