Need help?
#1

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	new file[256];
	new string[256], pname[MAX_PLAYER_NAME];
	GetPlayerName(playerid, pname, sizeof(pname));
	format(file, sizeof(string), "\\Users\\%s.ini", pname);
	if(dialogid == 1)
	{
		if(response)
		{
  		new tmp[256];
  		tmp = dini_Get(file, "hashPW");
  		if(!dini_Exists(file))
  		{
				SendClientMessage(playerid, COLOR_RED, "You are not registered! [KICK]");
				Kick(playerid);
			}
 			else if(udb_hash(inputtext) != strval(tmp))
 			{
    			format(string, 256, "Wrong Password For %s!", GetPlayerNameEx(playerid));
    				SendClientMessage(playerid, COLOR_YELLOW2, string);
			}
  		else 
  		 	{
    	    //Codes
				if(!response)
		{
         // Codes
				}
				}
				}
				}
				}
  	return 1;
  }
For some reason, the last response that I put, it doesnt work, so if I put response 1 at the top and response 0 at the bottom, response 0 wont work . .
Reply
#2

Thats wierd .

Take this line:
pawn Код:
if(!response)
        {
         // Codes
                }

Put it under:
pawn Код:
if(dialogid == 1)
    {

Thats should work .
Reply
#3

Quote:
Originally Posted by _Ben_[Fux-c.co.il RP
]
Thats wierd .

Take this line:
pawn Код:
if(!response)
        {
        // Codes
                }

Put it under:
pawn Код:
if(dialogid == 1)
    {

Thats should work .
Tried that already, it worked for the if(!response) but then it stopped working for the (response) at the bottom, whatever is at the bottom stops working
Reply
#4

The only thing I know that prevents code from continuing is when a cell of an array is called that doesn't exist.

Example:
pawn Код:
new array[5];
array[6]=10; //Script Hault Here
Same can go for strings

pawn Код:
new funnyword[5];
funnyword="Pickleweasle"; //String input is too large for the array
Reply
#5

Nope, arrays are fine, just double checked everything,

Can someone help me?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)