Problem with 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: Problem with tag mismatch (
/showthread.php?tid=273632)
Problem with tag mismatch -
red13 - 02.08.2011
Hi,
if i compile this script, i'll get quite a lot of these mistakes: "tag mismatch".
Of course I know what this message means, but I don't understand, why it's wrong.
The Gamemode works perfect, but I don't want to have over 20 warnings.
Код:
enum bizs{
strom,
gas,
nahrung,
wasser,
hotel,
zweiviersieben,
mietwohnungen,
tanke,
advertise,
lotto,
autohaus,
telefon
}
enum bizinfo{
owner,
waren,
maxwaren,
warenpreis,
Text:info,
kaufpreis,
bizbank,
minlevel
}
new BIZ[bizs][bizinfo];
new BIZName[bizs][255];
Код:
for(new i = 0; i < 12; i++){
BIZ[i][info] = TextDrawCreate(100,100," ");//mistake
new bizFormat[200];
format(bizFormat,200,"bizes/%d.ini",i);
BIZName[i] = dini_Get(bizFormat,"Name");//mistake
BIZ[i][owner] = dini_Int(bizFormat,"Besitzer");//mistake
BIZ[i][waren] = dini_Int(bizFormat,"Waren");//mistake
BIZ[i][maxwaren] = dini_Int(bizFormat,"Max_Waren");//mistake
BIZ[i][warenpreis] = dini_Int(bizFormat,"Warenpreis");//mistake
BIZ[i][kaufpreis] = dini_Int(bizFormat,"Kaufpreis");//mistake
BIZ[i][bizbank] = dini_Int(bizFormat,"BizBank");//mistake
BIZ[i][minlevel] = dini_Int(bizFormat,"Level");//mistake
}
edit: Ok, now I know what's wrong.
BIZ[0] will create an mistake.
BIZ[strom] is right.
But I have to call it with i.
Can you give me an other way to script it?