Problems with TextDrawSetString - Need Help
#1

Hello, I only want to change the text of a TextDraw every 5 seconds, I don't know why if I use this on the SetTimer:

Код:
nombre1 = dini_Get("Ranking1", "Nombre");
format(string,sizeof(string),"Primero: %s",strlen(nombre1));
TextDrawSetString(Textdraw0, string);
If I put this on the Timer , all command are bugged and say Unknow command. If I delete that, all commands works.

I don't have warnings and nothing :S


Thanks for all.
Reply
#2

%s to %d

pawn Код:
format(string,sizeof(string),"Primero: %d",strlen(nombre1));
Reply
#3

Thanks for the help but nombre1 it's a name.

What I can do?

Thanks.
Reply
#4

pawn Код:
format(string,sizeof(string),"Primero: %s",nombre1);
Reply
#5

strlen() = the length of string = integer
Reply
#6

Thanks, and what I can do to convert it to a string? Because if I use nombre1 alone says that array must be indexed.

Please help me and thanks.

EDIT: Erh... Thanks, problem fixed...
Reply
#7

Wrong usage
pawn Код:
GetPlayerName(targetid, name, sizeof(name));
format(string,sizeof(string),"Primero: %s",name);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)