[help] Am I misusing enums?
#1

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:

if you prefer to look at the code on pastebin: http://pawn.pastebin.com/b2Z4jLRr
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)