Blank inputtext
#1

Hey guys, i have this problem, when player enters nothing into the INPUTTEXT, it still does the action that if he entered something, other than the action that I want to show.

For example, this is when player join the server, and has to enter some password:
Код:
new string...
format...
showplayerdialog..
it simply just shows him inputtext dialog, that he has to enter some kind of password, now in ondialogresponse i have this condition:

Код:
if(!strlen(inputtext))
and inside this condition, i am showing a another dialog, the same one, that player saw when he connected

if(!strlen(inputtext))
{
same connect dialog
}

the thing is, that even if player does not enter anything into the inputtext, server still proceedes to another action
Reply
#2

well i got a idea how to fix my problem

in the brackets of if(!strlen(inputtext)) i am formatting a string, that i am showing in dialog, like this:

Код:
new string[16];
strcat(string, "something\n");
ShowPlayerDialog
so i just put the return in front of ShowPlayerDialog, but now the compiller stops working, can somebody help me with that?
Reply
#3

You got if(response) on top? if you are not getting a proper response it means you have more than one dialog with the same ID AND/OR another OnDialogResponse in a filterscript that doesn't have return 0; at the end of it.
Reply
#4

if(((!(inputtext[0])) || (((inputtext[0]) == '\1') && (!(inputtext[1])))))



and then show the dialog again to repeat his entry since he didnt enter smth
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)