[help] Am I misusing enums? - 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: [help] Am I misusing enums? (
/showthread.php?tid=198406)
[help] Am I misusing enums? -
Proxyded - 12.12.2010
Am I?
pawn Код:
#include <a_samp>
enum Gunz
{
deagle,
sawnoff,
uzi,
m4
}
enum data
{
description[128]
}
new weaponz[Gunz][data] =
{
{"Dgl, best pistol EVAR!!!!"},
{"noisy, but will pwn u"},
{"just to finish an opponent"},
{"long range ftw"}
};
main()
{
for(new a = 0; a < sizeof(weaponz); a++)
{
printf("%s", weaponz[a][description]); // warning 213: tag mismatch
}
return 1;
}
Quote:
Output:
Dgl, best pistol EVAR!!!!
noisy, but will pwn u
just to finish an opponent
long range ftw
|
As you can see, it works fine, but why does it say is tag mismatching?
__________________________________________________ ___________________________________
Fixed, thanks to Slice for the help.