Blank inputtext - 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: Blank inputtext (
/showthread.php?tid=647383)
Blank inputtext -
MrakBuster - 04.01.2018
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
Re: Blank inputtext -
MrakBuster - 04.01.2018
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?
Re: Blank inputtext -
RogueDrifter - 04.01.2018
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.
Re: Blank inputtext -
Meller - 04.01.2018
if(((!(inputtext[0])) || (((inputtext[0]) == '\1') && (!(inputtext[1])))))
and then show the dialog again to repeat his entry since he didnt enter smth