SA-MP Forums Archive
Textdraw Stats dont work - 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: Textdraw Stats dont work (/showthread.php?tid=315696)



Textdraw Stats dont work - SeKomodo - 04.02.2012

Hello , my Stats Textdraw dont work , i become much Warning/Error.

Код:
	    new str[16];
		new exp = PlayerInfo[i][pRespekt];
	  	new expamount = PlayerInfo[i][pNeedRespect];
	  	new slevel = PlayerInfo[i][pLevel];
    	format(str,sizeof(str),"~b~LvL:~y~%d ~b~Rp:~y~%d~b~/~y~%d",slevel,exp,expamount);
     	TextDrawSetString(stats1[i], str); The problem line
Код:
error 028: invalid subscript (not an array or too many subscripts): "stats1"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
greets SeKomodo


Re: Textdraw Stats dont work - =WoR=Varth - 04.02.2012

https://sampwiki.blast.hk/wiki/TextDrawSetString

I think it's your "stats1" varibale. (Created without "Text:" tag).

pawn Код:
new Text:stats1[MAX_PLAYERS]



AW: Textdraw Stats dont work - SeKomodo - 04.02.2012

Thx for your Answer , but i have this.

Код:
new Text:stats1[MAX_PLAYERS];
Код:
	    new str[16];
		new exp = PlayerInfo[i][pRespekt];
	  	new expamount = PlayerInfo[i][pNeedRespect];
	  	new slevel = PlayerInfo[i][pLevel];
    	format(str,sizeof(str),"~b~LvL:~y~%d ~b~Rp:~y~%d~b~/~y~%d",slevel,exp,expamount);
     	TextDrawSetString(stats1[i], str); The problem line
Код:
	    stats1[i] = TextDrawCreate(10.000000,430.000000,"_");
	    TextDrawAlignment(stats1[i],0);
	    TextDrawBackgroundColor(stats1[i],0x000000ff);
	    TextDrawFont(stats1[i],1);
	    TextDrawLetterSize(stats1[i],0.500000,1.5);
	    TextDrawColor(stats1[i],0xffffffff);
	    TextDrawSetOutline(stats1[i],1);
	    TextDrawSetProportional(stats1[i],1);
	    TextDrawSetShadow(stats1[i],1);
	    TextDrawShowForPlayer(i, stats1[i]);



AW: Textdraw Stats dont work - SeKomodo - 04.02.2012

No guy can help me , i fight over 2 days with the Problem