Strings problem
#6

format(charname,sizeof(charname),"%s",strlen(input text));

your problem is

strlen(inputtext)

it well return the number xD
inputtext is string itself so if you just put inputtext alone it will help you


so with putting inputtext alone it will define what ever exacly player wrote and set it to charname

i hope you understand

Note that stlen and strval is returning numbers as i know you wanted to save a string so you should use inputtext alon

here what it should be look like

PHP код:
new charname[128];
format(charname,sizeof(charname),"%s",inputtext);
SetPVarString(playerid,"CharName",charname); 
Reply


Messages In This Thread
Strings problem - by Lajko1 - 11.04.2017, 15:29
Re: Strings problem - by DarkSkull - 11.04.2017, 15:31
Re: Strings problem - by DarkSkull - 11.04.2017, 15:33
Re: Strings problem - by Vince - 11.04.2017, 15:38
Re: Strings problem - by Lajko1 - 11.04.2017, 15:56
Re: Strings problem - by khRamin78 - 11.04.2017, 16:34
Re: Strings problem - by Lajko1 - 11.04.2017, 16:44

Forum Jump:


Users browsing this thread: 1 Guest(s)