SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 26/01/2011, 01:53 PM   #1
BuLLeT[LTU]
Big Clucker
 
BuLLeT[LTU]'s Avatar
 
Join Date: May 2008
Location: Lithuania
Posts: 155
Reputation: 7
Default Textdraw problem.. [Solved]

Hi. I Have problem with this code:

pawn Code:
stock TextDrawSetStringLang(playerid,txtdraw,const string1[], const string2[])
{
    switch(PlayerI[playerid][Lang])
    {
        case 0: // ENG
        {
            TextDrawSetString(txtdraw,string1); //16557 line
        }
        case 1: // LTU
        {
            TextDrawSetString(txtdraw,string2); //16561 line
        }
    }
}
Errors:
C:\Users\Mindaugas\Desktop\EU-PG\gamemodes\EU-PG.pwn(16557) : warning 213: tag mismatch
C:\Users\Mindaugas\Desktop\EU-PG\gamemodes\EU-PG.pwn(16557) : error 035: argument type mismatch (argument 2)
C:\Users\Mindaugas\Desktop\EU-PG\gamemodes\EU-PG.pwn(16561) : warning 213: tag mismatch
C:\Users\Mindaugas\Desktop\EU-PG\gamemodes\EU-PG.pwn(16561) : error 035: argument type mismatch (argument 2)
-----------------------------------------------
Solved:
pawn Code:
forward TextDrawSetStringLang(playerid, Text:txtdraw,string1[], string2[]);
public TextDrawSetStringLang(playerid, Text:txtdraw,string1[], string2[])
{
    switch(PlayerI[playerid][Lang])
    {
        case 0: // ENG
        {
            TextDrawSetString(txtdraw,string1);
        }
        case 1: // LTU
        {
            TextDrawSetString(txtdraw,string2);
        }
    }
}

Last edited by BuLLeT[LTU]; 29/01/2011 at 07:35 AM.
BuLLeT[LTU] is offline  
Old 26/01/2011, 02:30 PM   #2
HyperZ
High-roller
 
HyperZ's Avatar
 
Join Date: Aug 2009
Location: Islamabad, Pakistan
Posts: 1,341
Reputation: 66
Default Re: Textdraw problem..

not getting any error.
__________________

Last edited by HyperZ; 26/01/2011 at 03:41 PM.
HyperZ is offline  
Old 26/01/2011, 03:21 PM   #3
BuLLeT[LTU]
Big Clucker
 
BuLLeT[LTU]'s Avatar
 
Join Date: May 2008
Location: Lithuania
Posts: 155
Reputation: 7
Default Re: Textdraw problem..

Somewhere put TextDrawSetStringLang(playerid,Textdaw,"a","a");

And then u will get this error..
BuLLeT[LTU] is offline  
Old 26/01/2011, 03:26 PM   #4
Vince
Spam Machine
 
Vince's Avatar
 
Join Date: Sep 2007
Location: Belgium
Posts: 10,068
Reputation: 2655
Default Re: Textdraw problem..

In your function header put: TextDrawSetStringLang(playerid, Text:txtdraw, const string1[], const string2[])
__________________
Vince is offline  
Old 26/01/2011, 03:43 PM   #5
BuLLeT[LTU]
Big Clucker
 
BuLLeT[LTU]'s Avatar
 
Join Date: May 2008
Location: Lithuania
Posts: 155
Reputation: 7
Default Re: Textdraw problem..

C:\Users\Mindaugas\Desktop\EU-PG\gamemodes\EU-PG.pwn(16461) : error 035: argument type mismatch (argument 2)
C:\Users\Mindaugas\Desktop\EU-PG\gamemodes\EU-PG.pwn(16465) : error 035: argument type mismatch (argument 2)

Same errors...

I use this:

pawn Code:
new tblstr[512],tblstr3[512];
format(tblstr,sizeof(tblstr),"~y~%s statistika:~n~~w~Levelis: ~y~%d~w~ | Nuzudymai: ~y~%d~w~ | Mirtys: ~y~%d~w~ | Ratio: ~y~%.2f~w~ |~n~Patirties taskai: ~y~%d~w~/~r~%d~w~ |",PlayerName(i),PlayerI[i][Rank],PlayerI[i][Kills],PlayerI[i][Deaths],floatdiv(PlayerI[i][Kills],PlayerI[i][Deaths]),PlayerI[i][Exp],RankInfo[NewRank][RRequirement]);
format(tblstr3,sizeof(tblstr3),"~y~%s's stats:~n~~w~Level: ~y~%d~w~ | Kills: ~y~%d~w~ | Deaths: ~y~%d~w~ | Ratio: ~y~%.2f~w~ |~n~EXP Points: ~y~%d~w~/~r~%d~w~ |",PlayerName(i),PlayerI[i][Rank],PlayerI[i][Kills],PlayerI[i][Deaths],floatdiv(PlayerI[i][Kills],PlayerI[i][Deaths]),PlayerI[i][Exp],RankInfo[NewRank][RRequirement]);
TextDrawSetStringLang(i,StatsTable[i],tblstr3,tblstr);

stock TextDrawSetStringLang(playerid,Text:txtdraw,const string1[], const string2[])
{
    switch(PlayerI[playerid][Lang])
    {
        case 0: // ENG
        {
            TextDrawSetString(txtdraw,string1); //16461
        }
        case 1: // LTU
        {
            TextDrawSetString(txtdraw,string2);//16465
        }
    }
}
BuLLeT[LTU] is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Textdraw problem ViruZZzZ_ChiLLL Help Archive 3 28/05/2010 07:50 AM
Textdraw problem. Razvann Help Archive 13 22/03/2010 12:34 PM
[HELP]TextDraw PROBLEM! Naty Help Archive 1 01/09/2009 06:39 PM
Problem with this textdraw cloud9 Help Archive 2 17/08/2009 05:07 AM
[Help] TextDraw problem :( SakuraBloss Help Archive 7 13/05/2009 06:35 AM


All times are GMT. The time now is 12:50 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.