[HELP] Save a string from inputtext to a variable
#1

Hello guys, iam trying to do something here but i cant:

i Have one variable created in top of GM:
Код:
VariavelString[30];
And i want to get the string from inputtext (from Dialog Input) and store in it.

Actually i am doing this, but it is not working:
Код:
VariavelString[29] = inputtext[29];
Someone?
Reply
#2

Try with it:
Код:
format(VariavelString, sizeof(VariavelString), "%s", inputtext);
If your variable can be change, before format use VariavelString[0] = EOS;
[0] - first char of your string and EOS - End Of String. Thanks to the fact You're making VariavelString empty before insert string into another string.

Also there's a one more function called strins:
Код:
strins(VariavelString, inputtext, 0);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)