SA-MP Forums Archive
What is PlayerText formatted as? - 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: What is PlayerText formatted as? (/showthread.php?tid=614178)



What is PlayerText formatted as? - Luicy. - 05.08.2016

Hi, I tried to format PlayerText: as a intenger but it seems like it gives me tag missmatch.

Code;
PHP код:
stock PlayerTextDrawFadeIn(playeridPlayerText:textdraw) {
    
PlayerTextDrawColor(playeridtextdraw0x11);
[
B]    SetTimerEx("FadeInPlayerTextdraw"1000false"iii"playeridtextdraw1);[/B]
}
forward FadeInPlayerTextdraw(playeridPlayerText:textdrawcount);
public 
FadeInPlayerTextdraw(playeridPlayerText:textdrawcount) {
    switch(
count) {
        case 
1: {
            
PlayerTextDrawColor(playeridtextdraw0x33);
[
B]            SetTimerEx("FadeInPlayerTextdraw"1000false"iii"playeridtextdraw2);[/B]
        }
        case 
2: {
            
PlayerTextDrawColor(playeridtextdraw0x55);
[
B]            SetTimerEx("FadeInPlayerTextdraw"1000false"iii"playeridtextdraw3);[/B]
        }
        case 
3: {
            
PlayerTextDrawColor(playeridtextdraw0x77);
        }
    }

Highlighted the error lines.


Re: What is PlayerText formatted as? - SyS - 05.08.2016

may be it will help you
PHP код:
stock PlayerTextDrawFadeIn(playeridPlayerText:textdraw) { 
    
PlayerTextDrawColor(playeridtextdraw0x11); 
    
SetTimerEx("FadeInPlayerTextdraw"1000false"iii"playerid_:textdraw1);

forward FadeInPlayerTextdraw(playeridPlayerText:textdrawcount); 
public 
FadeInPlayerTextdraw(playeridPlayerText:textdrawcount) { 
    switch(
count) { 
        case 
1: { 
            
PlayerTextDrawColor(playeridtextdraw0x33); 
         
SetTimerEx("FadeInPlayerTextdraw"1000false"iii"playerid_:textdraw2);
        } 
        case 
2: { 
            
PlayerTextDrawColor(playeridtextdraw0x55); 
           
SetTimerEx("FadeInPlayerTextdraw"1000false"iii"playerid_:textdraw3);
        } 
        case 
3: { 
            
PlayerTextDrawColor(playeridtextdraw0x77); 
        } 
    } 




Re: What is PlayerText formatted as? - Luicy. - 05.08.2016

Quote:
Originally Posted by Sreyas
Посмотреть сообщение
may be it will help you
PHP код:
stock PlayerTextDrawFadeIn(playeridPlayerText:textdraw) { 
    
PlayerTextDrawColor(playeridtextdraw0x11); 
    
SetTimerEx("FadeInPlayerTextdraw"1000false"iii"playerid_:textdraw1);

forward FadeInPlayerTextdraw(playeridPlayerText:textdrawcount); 
public 
FadeInPlayerTextdraw(playeridPlayerText:textdrawcount) { 
    switch(
count) { 
        case 
1: { 
            
PlayerTextDrawColor(playeridtextdraw0x33); 
         
SetTimerEx("FadeInPlayerTextdraw"1000false"iii"playerid_:textdraw2);
        } 
        case 
2: { 
            
PlayerTextDrawColor(playeridtextdraw0x55); 
           
SetTimerEx("FadeInPlayerTextdraw"1000false"iii"playerid_:textdraw3);
        } 
        case 
3: { 
            
PlayerTextDrawColor(playeridtextdraw0x77); 
        } 
    } 

Thanks, care to explain what _: does?


Re: What is PlayerText formatted as? - Vince - 05.08.2016

Use the empty tag override for such occasions.
PHP код:
_
PHP код:
SetTimerEx("FadeInPlayerTextdraw"1000false"iii"playerid_:textdraw1); 
Edit: too slow. This mismatch occurs because the tag list for the variable arguments in format() does not list the Text: tag. If a tag is not listed and it is a strong tag (starts with a capital letter) then a mismatch will occur.


Re: What is PlayerText formatted as? - SyS - 05.08.2016

Quote:
Originally Posted by Meller
Посмотреть сообщение
Thanks, care to explain what _: does?
_: removes the tag from textdraw variable