Dialog Problem
#1

when i put this in my sricpt i get this error

can anyone help me thanks in advance

C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(5170 : error 029: invalid expression, assumed zero
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51755) : warning 209: function "OnDialogResponse" should return a value
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51757) : error 010: invalid function or declaration

pawn Код:
}
        }
    }
    if(dialogid == 1244)
    {
        if(response)
        {
            if (gPlayerAccount[playerid] != 0)
            {
                ShowPlayerDialog(playerid, 1245, DIALOG_STYLE_INPUT,"Welcome, Please Log-In","Type your password below to log-in","Log-in","Quit");
            }
            else
            {
                ShowPlayerDialog(playerid, 1246, DIALOG_STYLE_INPUT,"Welcome, Please Register","Type your password below to register a new account.","Register","Quit");
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY,"* You selected \"Refuse\", To play you must agree to the terms of condition");
                Kick(playerid);
            }
        }
    }
    if(dialogid == 1245)
    {
        if(response)
        {
            strmid(Typed[playerid], inputtext, 0, strlen(inputtext), 255);
            if(!strcmp(Typed[playerid], "None", true))
            {
                ShowPlayerDialog(playerid, 1245, DIALOG_STYLE_INPUT,"Try Again, Please Log-In","You didn't typed a password!\nType your password below to log-in","Log-in","Quit");
            }
            else
            {
                OnPlayerLogin(playerid, inputtext);
               }
            }
            else
            {
                Kick(playerid);
            }
        }
        if(dialogid == 1246)
        {
            if(response == 1)
            {
                if(strlen(inputtext) < 3)
                {
                    ShowPlayerDialog(playerid, 1246, DIALOG_STYLE_INPUT,"Try Again, Please Register","The password entered is Too Short!\nType your password below to register a new account.","Register","Quit");
                    return 1;
                }
                if(strlen(inputtext) > 20)
                {
                    ShowPlayerDialog(playerid, 1246, DIALOG_STYLE_INPUT,"Try Again, Please Register","The password entered is too Long!\nType your password below to register a new account.","Register","Quit");
                    return 1;
                }
                OnPlayerRegister(playerid, inputtext);
            }
            else
            {
                Kick(playerid);
            }
        }
    }
Reply
#2

Which line?

And for "function "OnDialogResponse" should return a value" it's clearly stating that you must return a value in OnDialogReponse.
pawn Код:
return 1;
Reply
#3

when i put return 1; under kick(playerid); i get this.. or i put return on wrong place xD

Код:
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51695) : warning 209: function "OnDialogResponse" should return a value
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51696) : error 054: unmatched closing brace ("}")
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51698) : error 010: invalid function or declaration
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51700) : error 010: invalid function or declaration
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51702) : error 010: invalid function or declaration
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51706) : error 010: invalid function or declaration
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51710) : error 010: invalid function or declaration
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51717) : error 010: invalid function or declaration
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51719) : error 010: invalid function or declaration
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51722) : error 010: invalid function or declaration
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51726) : error 010: invalid function or declaration
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51728) : error 021: symbol already defined: "OnPlayerLogin"
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51731) : error 010: invalid function or declaration
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51736) : error 010: invalid function or declaration
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51738) : error 010: invalid function or declaration
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51740) : error 010: invalid function or declaration
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51743) : error 010: invalid function or declaration
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51745) : error 010: invalid function or declaration
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51748) : error 010: invalid function or declaration
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51750) : error 021: symbol already defined: "OnPlayerRegister"
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51752) : error 010: invalid function or declaration
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51755) : error 010: invalid function or declaration
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51760) : error 010: invalid function or declaration
Reply
#4

Probably your brackets are messed up. Could you post your whole "OnDialogResponse" callback?
Reply
#5

Quote:
Originally Posted by SmiT
Посмотреть сообщение
Probably your brackets are messed up. Could you post your whole "OnDialogResponse" callback?
okej here is whole. I appreciate the help cant put the text here so i put in pastebin

http://pastebin.com/ybKAX58j
Reply
#6

You had some brackets messed up, I fixed them for you: http://pastebin.com/MMdz7N12
Reply
#7

Quote:
Originally Posted by SmiT
Посмотреть сообщение
You had some brackets messed up, I fixed them for you: http://pastebin.com/MMdz7N12
thanks.. but now i get this

C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51707) : error 029: invalid expression, assumed zero
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51755) : warning 209: function "OnDialogResponse" should return a value
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51757) : error 010: invalid function or declaration
C:\Users\Robin\Desktop\mod by FrostJkeee\gamemodes\RolePlay.pwn(51760) : error 054: unmatched closing brace ("}")
Reply
#8

Quote:
Originally Posted by SmiT
Посмотреть сообщение
You had some brackets messed up, I fixed them for you: http://pastebin.com/MMdz7N12
Do you know how to fix this
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)