Warning but works
#1

Hello I have this code:

pawn Код:
enum pInfos
{
    aTest1, //1
    aTest2, //2
    aTest3 //3
}
Somewhere in the code, I want to use it like this:

pawn Код:
for (new i = 0; i < pInfos; i++)
It works (returns 3 which is the enum count), But gives Tag Mismatch warning. How do I get rid of this warning?
Reply
#2

use
pawn Код:
for (new i = 0; i < _:pInfos; i++)
Reply
#3

Quote:
Originally Posted by BroZeus
Посмотреть сообщение
use
pawn Код:
for (new i = 0; i < _:pInfos; i++)
Oh wow. Works great. Now I have one more Tag Mismatch warning.

There is this:

pawn Код:
new PlayerInfo[MAX_PLAYERS][pInfos];
So I want to use it like this:

pawn Код:
if (PlayerInfo[playerid][i] == 0)
Reply
#4

Bumper sticker.
Reply
#5

To clarify: Here's the code:

pawn Код:
enum pInfos
{
    aTest1, //1
    aTest2, //2
    aTest3 //3
}
new PlayerInfo[MAX_PLAYERS][pInfos];


...

for (new i = 0; i < _:pInfos; i++)
{
if (PlayerInfo[playerid][i] == 0) //Tag mismatch warning because of [i]
{
...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)