Strange errors.
#1

No long story... This is the code:

pawn Код:
enum roduInfo
{
    rID,
    rMaja,
    rKorter,
    bool:rLukk,
    Float:rExtPos[3],
    Float:rIntPos[3],
    Text3D:rLabel[2],
}
new RoduInfo[MAX_BALCONIES][roduInfo];

    stock LisaRoduSiseLabel(id)
    {
            new maja = HouseLoopID(RoduInfo[id][rMaja]), korter = ApartmentLoopID(RoduInfo[id][rKorter]);
            if (maja != -1) RoduInfo[id][rLabel][1] = CreateDynamic3DTextLabel("Rхdu", COLOR_LIGHTBLUE, RoduInfo[id][mIntPos][0], RoduInfo[id][mIntPos][1], RoduInfo[id][mIntPos][2], 25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, MajaInfo[maja][mVW], MajaInfo[maja][mInterior]); // 3358
            elseif (korter != -1) RoduInfo[id][rLabel][1] = CreateDynamic3DTextLabel("Rхdu", COLOR_LIGHTBLUE, RoduInfo[id][mIntPos][0], RoduInfo[id][mIntPos][1], RoduInfo[id][mIntPos][2], 25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, KorteriInfo[korter][kVW], KorteriInfo[korteri][kInterior]);
            else Bug(INVALID_PLAYER_ID, BUG_TYPE_RODUINT, id);
            return 1;
    }
And this is what I get:

Код:
imperial/vara.pwn(3355 -- 3358) : warning 213: tag mismatch
imperial/vara.pwn(3355 -- 3358) : error 001: expected token: ",", but found "["
imperial/vara.pwn(3358) : warning 217: loose indentation
imperial/vara.pwn(3358) : error 029: invalid expression, assumed zero
imperial/vara.pwn(3358) : warning 215: expression has no effect
imperial/vara.pwn(3358) : error 001: expected token: ";", but found "]"
imperial/vara.pwn(3358) : fatal error 107: too many error messages on one line
Reply
#2

It's "else if" and not "elseif".
Reply
#3

Oh, right, I have this:

#define elseif else if
Reply
#4

Could you tell us which lines have these errors?
Reply
#5

I made a comment at 3358. Also, 3359 might be bugged, those lines are similar.

Edit: Added RoduInfo to the first post.
Reply
#6

Remove the last comma after rLabel in the enum.
Reply
#7

Nope, still not working. You can have a comma in the end of an enumerator.
Reply
#8

Yo!
The message you have entered is too short. Please lengthen your message to at least 4 characters.

Edit: Fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)