Textdraw problem..
#1

Hi. I Have problem with this code:

pawn Код:
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 Код:
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);
        }
    }
}
Reply
#2

not getting any error.
Reply
#3

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

And then u will get this error..
Reply
#4

In your function header put: TextDrawSetStringLang(playerid, Text:txtdraw, const string1[], const string2[])
Reply
#5

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 Код:
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
        }
    }
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)