Textdraw tag mismatches?
#1

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);
Reply
#2

Код:
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.
Reply
#3

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

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

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)
Reply
#6

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.
Reply
#7

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
Reply
#8

Remove that, It's clearly not needed.
Reply
#9

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. :>
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)