SA-MP Forums Archive
dialog input - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: dialog input (/showthread.php?tid=240428)



dialog input - hadzx - 15.03.2011

i made a dialog input but it only lets 1charactor??


Код:
if(inputtext[128] == '1')
if i change the "1" to like password

it just gets these errors


Код:
C:\Users\Stephen-Laptop\Desktop\fuckin serv\gamemodes\test2.pwn(455) : error 027: invalid character constant
C:\Users\Stephen-Laptop\Desktop\fuckin serv\gamemodes\test2.pwn(455) : error 017: undefined symbol "assword"
C:\Users\Stephen-Laptop\Desktop\fuckin serv\gamemodes\test2.pwn(455 -- 456) : error 029: invalid expression, assumed zero
C:\Users\Stephen-Laptop\Desktop\fuckin serv\gamemodes\test2.pwn(455 -- 456) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
plz help ty


Re: dialog input - austin070 - 15.03.2011

Making a '#' only allows 1 digit. Do it like this:

pawn Код:
if(!strfind(inputtext,"password", true))
     {
          //Do stuff here
          }else {
          //Do something here if password is incorrect
          }