SA-MP Forums Archive
Warning 299: index tag mismatch -> Please help me out! - 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)
+--- Thread: Warning 299: index tag mismatch -> Please help me out! (/showthread.php?tid=417307)



Warning 299: index tag mismatch -> Please help me out! - JamesS - 20.02.2013

Well, i have been on this for a while now, And I can't seem to get it fixed. I'm creating a mailbox system, and this one uses 3d Text labels to display the owner name, now, I made the ability of moving them(by an admin command), Now as there is no way of moving a 3Dtext-label (or is there any?). I just remove the txt label, and recreate it at the position, now ofcourse I have to check the owner name, and thats where it goes wrong, please help me out!

Code :

Enum where Owner is in.
Код:
enum MAIL_BOX{
 bool:Owned,
 Owner[MAX_PLAYER_NAME],
 Messages
}
new gMAIL_BOX[MAX_MAILBOXES][MAIL_BOX];
Код:
new name1[MAX_PLAYER_NAME], string[128];
GetPlayerName(player, name1, sizeof(name1)
gMAIL_BOX[boxid][Owner] = name1;
Line where I get the error from :
Код:
owner[MAX_PLAYER_NAME];
owner = gMAIL_BOX[boxid][Owner];



Re: Warning 299: index tag mismatch -> Please help me out! - Jefff - 20.02.2013

replace

owner = gMAIL_BOX[boxid][Owner];

to

strcat(owner,gMAIL_BOX[boxid][Owner]);

and you can do

GetPlayerName(player, gMAIL_BOX[boxid][Owner], MAX_PLAYER_NAME);


Re: Warning 299: index tag mismatch -> Please help me out! - JamesS - 20.02.2013

That helped me out, Thanks alot man!