dialog problem with inputtext
#1

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?
Reply
#2

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}
Reply
#3

SO MANY THX

it works
!!

thank you!!
Reply
#4

no problem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)