Tag mismatch - 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 (
/showthread.php?tid=147372)
Tag mismatch -
Mechscape - 11.05.2010
Код:
PlayerInfo[playerid][pDrugs] = PlayerInfo[playerid][pDrugs]+vehTrunkDrugs[result];
Says it output:
warning 213: Tag mismatch
I dont see any mistakes.. Can anyone help?
Re: Tag mismatch -
Zh3r0 - 11.05.2010
http://forum.sa-mp.com/index.php?topic=167147.0
Re: Tag mismatch -
FUNExtreme - 11.05.2010
Show us the vehTrunk... variable
Re: Tag mismatch -
Mechscape - 11.05.2010
Quote:
Originally Posted by FUNExtreme
Show us the vehTrunk... variable
|
What?
Код:
new vehTrunk[MAX_VEHICLES][MAX_TRUNK_SLOTS];
Re: Tag mismatch -
Mechscape - 15.05.2010
« Reply #3 on: May 11, 2010, 10:31:34 pm » && So 12h is over.
Код:
new Float:vehTrunkMats[MAX_VEHICLES];
new Float:vehTrunkDrugs[MAX_VEHICLES];
Can anyone help? Still can't fix...
Result:
PlayerInfo[playerid][pDrugs] += vehTrunkDrugs[result];
Explain:
Compile output without warning & error, but ... doenst work it.
I put 100 materials into trunk and taking materials trunk off, then i have 10 billions materials... Must be 100 materials not 10b..
Re: Tag mismatch -
juice.j - 15.05.2010
Why are they floats?
Re: Tag mismatch -
Mechscape - 15.05.2010
Quote:
Originally Posted by juice.j
Why are they floats?
|
I dont know, i followed like: new Float:vehTrunkArmour[MAX_VEHICLES];
Then "Float:" isn't needed?
Re: Tag mismatch -
juice.j - 15.05.2010
Depends on the rest of your code.
Anyways the problem is most likely vehTrunkDrugs[result]. What is result?
Re: Tag mismatch -
Mechscape - 15.05.2010
I think, result is:
I put 100 drugs, then result 100 or it's car ID?
/trunk command:
http://pawn.pastebin.com/B6ThWLWt
I removed 2 thing's "
Float:" and i get 2 warning's.
Output
Код:
C:\Documents and Settings\Kasutaja\My Documents\SAMP\gamemodes\sg.pwn(48150) : warning 213: tag mismatch
C:\Documents and Settings\Kasutaja\My Documents\SAMP\gamemodes\sg.pwn(48151) : warning 213: tag mismatch
Code
Код:
vehTrunkMats[idx] = floatstr(arrCoords[10]);
vehTrunkDrugs[idx] = floatstr(arrCoords[11]);
Full Code
Код:
public LoadTrunk()
{
new arrCoords[13][64];
new strFromFile2[256];
new File: file = fopen("trunk.cfg", io_read);
if (file)
{
new idx = 1;
while (idx < sizeof(CarInfo))
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, ',');
vehTrunk[idx][1] = strval(arrCoords[0]);
vehTrunkAmmo[idx][1] = strval(arrCoords[1]);
vehTrunk[idx][2] = strval(arrCoords[2]);
vehTrunkAmmo[idx][2] = strval(arrCoords[3]);
vehTrunk[idx][3] = strval(arrCoords[4]);
vehTrunkAmmo[idx][3] = strval(arrCoords[5]);
vehTrunk[idx][4] = strval(arrCoords[6]);
vehTrunkAmmo[idx][4] = strval(arrCoords[7]);
vehTrunkCounter[idx] = strval(arrCoords[8]);
vehTrunkArmour[idx] = floatstr(arrCoords[9]);
vehTrunkMats[idx] = floatstr(arrCoords[10]);
vehTrunkDrugs[idx] = floatstr(arrCoords[11]);
idx++;
}
}
return 1;
}
Re: Tag mismatch -
juice.j - 15.05.2010
Just keep the Float: in for now...
Nevermind about "result" I thought that was a string.
I guess PlayerInfo[playerid][pDrugs] is an integer while vehTrunkDrugs[result] is a float.
Is that the case?