Tag Mismatch - 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 - sscanf (
/showthread.php?tid=193670)
Tag Mismatch - sscanf - [L3th4l] - 27.11.2010
The line I'm getting the warning is on the sscanf line:
pawn Код:
stock LoadPInfo(playerid)
{
new Query[600];
if(mysql_fetch_row(Query))
{
sscanf(Query, sizeof(Query), "e<p<|>s[24]s[24]dddds[24]ddddddddddddd>", PVar[playerid]);
mysql_free_result();
}
if(PVar[playerid][pHasSkin] == 1)//GetPVarInt(playerid, "HasSkin") == 1)
{
SpawnPlayer(playerid);
SetPlayerSkin(playerid, PVar[playerid][pSkinID]);//GetPVarInt(playerid, "SkinID"));
}
return 1;
}
And here is the enum:
pawn Код:
enum _PSTATS
{
pLayaName[24],
pPassword[24],
pKills,
pDeaths,
pScore,
pMoney,
pIP[24],
pLevel,
pBankMoney,
pDrunkLvl,
pHasObj,
pObjID,
pBoneID,
pFightStyle,
pBoost,
pVChange,
pGamePlay,
pLanguage,
pHasSkin,
pSkinID,
}
new PVar[MAX_PLAYERS][_PSTATS];
Код:
error 035: argument type mismatch (argument 2)
Re: Tag Mismatch - sscanf -
smeti - 27.11.2010
Change
pawn Код:
sscanf(Query, sizeof(Query), "e<p<|>s[24]s[24]dddds[24]ddddddddddddd>", PVar[playerid]);
Try:
pawn Код:
sscanf(Query, "e<p<|>s[24]s[24]dddds[24]ddddddddddddd>", PVar[playerid]);
Delete (, sizeof(Query))
Re: Tag Mismatch - sscanf - [L3th4l] - 27.11.2010
Brilliant!! Thanks for that. I'll remember it