SA-MP Forums Archive
Textdraw tag mismatches? - 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: Textdraw tag mismatches? (/showthread.php?tid=245362)



Textdraw tag mismatches? - Rokzlive - 31.03.2011

Ok im getting 12 mismatch errors on a textdraw that is perfectly fine.

Код:
C:\Users\Nickolas\Desktop\PWn\Server\gamemodes\bus.pwn(1466) : warning 213: tag mismatch
C:\Users\Nickolas\Desktop\PWn\Server\gamemodes\bus.pwn(1467) : warning 213: tag mismatch
C:\Users\Nickolas\Desktop\PWn\Server\gamemodes\bus.pwn(1468) : warning 213: tag mismatch
C:\Users\Nickolas\Desktop\PWn\Server\gamemodes\bus.pwn(1469) : warning 213: tag mismatch
C:\Users\Nickolas\Desktop\PWn\Server\gamemodes\bus.pwn(1470) : warning 213: tag mismatch
C:\Users\Nickolas\Desktop\PWn\Server\gamemodes\bus.pwn(1471) : warning 213: tag mismatch
C:\Users\Nickolas\Desktop\PWn\Server\gamemodes\bus.pwn(1472) : warning 213: tag mismatch
C:\Users\Nickolas\Desktop\PWn\Server\gamemodes\bus.pwn(1473) : warning 213: tag mismatch
C:\Users\Nickolas\Desktop\PWn\Server\gamemodes\bus.pwn(1474) : warning 213: tag mismatch
C:\Users\Nickolas\Desktop\PWn\Server\gamemodes\bus.pwn(1475) : warning 213: tag mismatch
C:\Users\Nickolas\Desktop\PWn\Server\gamemodes\bus.pwn(1477) : warning 213: tag mismatch
C:\Users\Nickolas\Desktop\PWn\Server\gamemodes\bus.pwn(1611) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


12 Warnings.
pawn Код:
mtd[i] = TextDrawCreate(499.000000,77.000000,"$00000000");
        TextDrawUseBox(mtd[i],1);
        TextDrawBoxColor(mtd[i],0x000000ff);
        TextDrawTextSize(mtd[i],729.000000,236.000000);
        TextDrawAlignment(mtd[i],1);
        TextDrawBackgroundColor(mtd[i],0x000000ff);
        TextDrawFont(mtd[i],3);
        TextDrawLetterSize(mtd[i],0.499999,2.000000);
        TextDrawColor(mtd[i],0xffffffff);
        TextDrawSetProportional(mtd[i],1);
        TextDrawSetShadow(advert[i],1);
        TextDrawSetShadow(mtd[i],1);



Re: Textdraw tag mismatches? - -Rebel Son- - 31.03.2011

Код:
mtd[MAX_PLAYERS];
at the top.

PHP код:
    for(new 0MAX_PLAYERSi++)
    {
        
TextDrawUseBox(mtd[i],1);        
TextDrawBoxColor(mtd[i],0x000000ff);        
TextDrawTextSize(mtd[i],729.000000,236.000000);       
 
TextDrawAlignment(mtd[i],1);       
 
TextDrawBackgroundColor(mtd[i],0x000000ff);       
 
TextDrawFont(mtd[i],3);        
TextDrawLetterSize(mtd[i],0.499999,2.000000);        
TextDrawColor(mtd[i],0xffffffff);        
TextDrawSetProportional(mtd[i],1);       
 
TextDrawSetShadow(advert[i],1);        
TextDrawSetShadow(mtd[i],1);

Under OnGameModeInIt.


Re: Textdraw tag mismatches? - Donya - 31.03.2011

change
pawn Код:
new mtd[MAX_PLAYERS];
to
pawn Код:
new Text:mtd[MAX_PLAYERS];
that was his problem i bet


Re: Textdraw tag mismatches? - -Rebel Son- - 31.03.2011

Whoops, forgot it was a textdraw, spaced my mind. Thanks for tippin that donya.


Re: Textdraw tag mismatches? - leong124 - 31.03.2011

Quote:
Originally Posted by Donya
Посмотреть сообщение
change
pawn Код:
new mtd[MAX_PLAYERS];
to
pawn Код:
new Text:mtd[MAX_PLAYERS];
that was his problem i bet
pawn Код:
new Text:mtd[MAX_PLAYERS] = {INVALID_TEXT_DRAW,...};
Weird things will happen if you don't initialise the text draws..(Happened to me)


Re: Textdraw tag mismatches? - Rokzlive - 31.03.2011

Quote:
Originally Posted by Donya
Посмотреть сообщение
change
pawn Код:
new mtd[MAX_PLAYERS];
to
pawn Код:
new Text:mtd[MAX_PLAYERS];
that was his problem i bet
No i had that i just did not see the reason to put it in the post.


Re: Textdraw tag mismatches? - Rokzlive - 31.03.2011

Quote:
Originally Posted by leong124
Посмотреть сообщение
pawn Код:
new Text:mtd[MAX_PLAYERS] = {INVALID_TEXT_DRAW,...};
Weird things will happen if you don't initialise the text draws..(Happened to me)
It got rid of all but one tag mismatch, and the one that is left is on that line. xD


Re: Textdraw tag mismatches? - -Rebel Son- - 31.03.2011

Remove that, It's clearly not needed.


Re: Textdraw tag mismatches? - Vince - 31.03.2011

Quote:
Originally Posted by leong124
Посмотреть сообщение
pawn Код:
new Text:mtd[MAX_PLAYERS] = {INVALID_TEXT_DRAW,...};
Weird things will happen if you don't initialise the text draws..(Happened to me)
Hmm, never happened to me, but I'll keep that in mind. :>


Re: Textdraw tag mismatches? - iggy1 - 31.03.2011

Have you ever seen textdraws mix up? Thats because they are not initialised as invalid textdraws. They should be initialised or eventually they will mix up. I think its something to do with the way IDs are assigned to textdraws internally.