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



dialog problem with inputtext - legodude - 10.04.2010

Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
  if(dialogid == 1337)
  {
		{
			
    	if (inputtext == VIP_PASS)
    	{
    		new message[256];
    		format(message, sizeof(message), "you are logged in as vip member now!");
    		SendClientMessage(playerid, 0xFFFFFFFF, message);
    	}
			else
			{
			new message[256];
    	format(message, sizeof(message), "you are logged in as vip member now!");
    	SendClientMessage(playerid, 0xFFFFFFFF, message);
    	return 1;
    	}
		}
  }
	return 1;
}
it says i must index the array.
how to do that?


Re: dialog problem with inputtext - Cank - 10.04.2010

you get this error because you cant do "If(inputtext==bla)"
why?
because inputtext[] is a string.
i would do:

Code:
if(strcmp(inputtext, "VIP", 1)==0){ bla}



Re: dialog problem with inputtext - legodude - 10.04.2010

SO MANY THX

it works
!!

thank you!!



Re: dialog problem with inputtext - Cank - 10.04.2010

no problem