Some errors that make 0 sense with me!
#1

ERRORS:
pawn Код:
C:\Users\EASYHOME\Desktop\UniverseOfStunting\pawno\include\dutils.inc(298) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\pawno\include\dutils.inc(462) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\pawno\include\dini.inc(46) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(1465) : warning 219: local variable "String" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(2750) : warning 219: local variable "String" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(2761) : warning 219: local variable "String" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(2772) : warning 219: local variable "String" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(2783) : warning 219: local variable "String" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3087) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3110) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3360) : warning 219: local variable "vehid" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3379) : warning 219: local variable "vehid" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3469) : warning 219: local variable "vehid" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3482) : warning 219: local variable "vehid" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3563) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3567) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3568) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3570) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3571) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3576) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3584) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3588) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3594) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3597) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3599) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3601) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3602) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3603) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3604) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3606) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3608) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3610) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3612) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3613) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3614) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3615) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3616) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3617) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3618) : error 010: invalid function or declaration
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3619) : error 010: invalid function or declaration

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.
I checked if i was missing a bracket but Missing Bracket Finder said nothing was wrong.

And all of these errors are in OnDialogResponse so i just posted my whole entire thing of it

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == register)
    {
            GetPlayerName(playerid, Name, sizeof(Name));
            format(file, sizeof(file), SERVER_USER_FILE, Name);
            if(!response) return Kick(playerid);
            if (!strlen(inputtext)) return
            ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Register", "Welcome, your not registered, please fill in a password", "Register", "Leave");
            dini_Create(file);
            dini_IntSet(file, "Password", udb_hash(inputtext));
            dini_IntSet(file, "AdminLevel",0);
            dini_IntSet(file, "Money",0);
            dini_IntSet(file, "Score",0);
            dini_IntSet(file, "Warns",0);
            format(String, 128, "[SYSTEM]: You succesfully registered the nickname %s with password %s, you have been auto logged in.", Name, inputtext);
            SendClientMessage(playerid, COLOR_YELLOW, String);
            gPlayerLogged[playerid] = 1;
        }
    return 1;
}
        if (dialogid == login)
        {
            GetPlayerName(playerid, Name, sizeof(Name));
            format(file, sizeof(file), SERVER_USER_FILE, Name);
            if(!response) return Kick(playerid);
            if(!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login", "You're already registered, please login.", "Login", "Leave");
            new tmp;
            tmp = dini_Int(file, "Password");
            if(udb_hash(inputtext) != tmp)
            {
                SendClientMessage(playerid, COLOR_RED, "Wrong password");
                ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login", "You're already registered, please login.", "Login", "Leave");
            }
            else
            {
                gPlayerLogged[playerid] = 1;
                PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "AdminLevel");
                PlayerInfo[playerid][pScore] = dini_Int(file, "Score");
                PlayerInfo[playerid][pWarns] = dini_Int(file, "Warns");
                PlayerInfo[playerid][pCash] = dini_Int(file, "Money");

                Save[playerid] = SetTimerEx("SaveStats",1000,true,"i",playerid);
                SendClientMessage(playerid,COLOR_RED, "[SYSTEM]: Successfully logged in!");
                GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
                SetPlayerScore(playerid,PlayerInfo[playerid][pScore]);
                if(PlayerInfo[playerid][pAdminLevel] >0)
                {
                format(String,sizeof(String),"Admin %s has logged in",Name[playerid]);
                SendClientMessageToAll(COLOR_ORANGE,String);
                }
            }
        return 1;
    }
   
    if(dialogid == teleports && response) // If you edit something in the actual dialog commands, edit this too. Be sure to make case numbers line up, too.
    {
        switch(listitem)
        {
            case 0: dcmd_stuntzones(playerid, "");
            case 1: dcmd_dmzones(playerid, "");
            case 2: dcmd_parkourzones(playerid, "");
            case 3: dcmd_otherzones(playerid, "");
        }
        return 1;
    }
    if(dialogid == stunting && response)
    {
        switch(listitem)
        {
            case 0: dcmd_bigjump(playerid, "");
            case 1: dcmd_bigjump2(playerid, "");
            case 2: dcmd_lstower(playerid, "");
            case 3: dcmd_buildingjump(playerid, "");
            case 4: dcmd_chilliad(playerid, "");
            case 5: dcmd_skatepark(playerid, "");
            case 6: dcmd_lvairport(playerid, "");
            case 7: dcmd_aquapark(playerid, "");
            case 8: dcmd_freeway(playerid, "");
            case 9: dcmd_deadjump(playerid, "");
            case 10: dcmd_wallride(playerid, "");
            case 11: dcmd_waytodeath(playerid, "");
            case 12: dcmd_stadium(playerid, "");
            case 13: dcmd_monstercrash(playerid, "");
            case 14: dcmd_drift(playerid, "");
        }
        return 1;
    }
   
    if(dialogid == deathmatchs && response)
    {
        switch(listitem)
        {
            case 0: dcmd_bloodringarena(playerid, "");
            case 1: dcmd_airbattle(playerid, "");
            case 2: dcmd_derby(playerid, "");
            case 3: dcmd_mgm(playerid, "");
            case 4: dcmd_gm(playerid, "");
            case 5: dcmd_sm(playerid, "");
            case 6: dcmd_rcwar(playerid, "");
        }
        return 1;
    }

    if(dialogid == others && response)
    {
        switch(listitem)
        {
            case 0: dcmd_home(playerid, "");
            case 1: dcmd_tune1(playerid, "");
            case 2: dcmd_tune2(playerid, "");
            case 3: dcmd_tune3(playerid, "");
            case 4: dcmd_tune4(playerid, "");
            case 5: dcmd_AA(playerid, "");
            case 6: dcmd_dragrace(playerid, "");
            case 7: dcmd_karting(playerid, "");
            case 8: dcmd_ctruckstop(playerid, "");
            case 9: dcmd_lsstation(playerid, "");
            case 10: dcmd_sfstation(playerid, "");
            case 11: dcmd_lvstation1(playerid, "");
            case 12: dcmd_lvstation2(playerid, "");
            case 13: dcmd_dtruckstop(playerid, "");
        }
        return 1;
    }
Reply
#2

Look under return 1; from the first dialog response, there's an unnecessary bracket there.
Reply
#3

Quote:
Originally Posted by [ABK]Antonio
Посмотреть сообщение
Look under return 1; from the first dialog response, there's a unnecessary bracket there.
Umm... I don't see it, please correct it for me, I suck with these dialogs
Reply
#4

Look at the closing bracket after the return 1; on the register dialog entry, delete it lol.
Reply
#5

Quote:
Originally Posted by [ABK]Antonio
Посмотреть сообщение
Look at the closing bracket after the return 1; on the register dialog entry, delete it lol.
still not helping, still got teh same errors
Reply
#6

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == register)
    {
            GetPlayerName(playerid, Name, sizeof(Name));
            format(file, sizeof(file), SERVER_USER_FILE, Name);
            if(!response) return Kick(playerid);
            if (!strlen(inputtext)) return
            ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Register", "Welcome, your not registered, please fill in a password", "Register", "Leave");
            dini_Create(file);
            dini_IntSet(file, "Password", udb_hash(inputtext));
            dini_IntSet(file, "AdminLevel",0);
            dini_IntSet(file, "Money",0);
            dini_IntSet(file, "Score",0);
            dini_IntSet(file, "Warns",0);
            format(String, 128, "[SYSTEM]: You succesfully registered the nickname %s with password %s, you have been auto logged in.", Name, inputtext);
            SendClientMessage(playerid, COLOR_YELLOW, String);
            gPlayerLogged[playerid] = 1;
        }
    //return 1;
//}
        if (dialogid == login)
        {
            GetPlayerName(playerid, Name, sizeof(Name));
            format(file, sizeof(file), SERVER_USER_FILE, Name);
            if(!response) return Kick(playerid);
            if(!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login", "You're already registered, please login.", "Login", "Leave");
            new tmp;
            tmp = dini_Int(file, "Password");
            if(udb_hash(inputtext) != tmp)
            {
                SendClientMessage(playerid, COLOR_RED, "Wrong password");
                ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login", "You're already registered, please login.", "Login", "Leave");
            }
            else
            {
                gPlayerLogged[playerid] = 1;
                PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "AdminLevel");
                PlayerInfo[playerid][pScore] = dini_Int(file, "Score");
                PlayerInfo[playerid][pWarns] = dini_Int(file, "Warns");
                PlayerInfo[playerid][pCash] = dini_Int(file, "Money");

                Save[playerid] = SetTimerEx("SaveStats",1000,true,"i",playerid);
                SendClientMessage(playerid,COLOR_RED, "[SYSTEM]: Successfully logged in!");
                GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
                SetPlayerScore(playerid,PlayerInfo[playerid][pScore]);
                if(PlayerInfo[playerid][pAdminLevel] >0)
                {
                format(String,sizeof(String),"Admin %s has logged in",Name[playerid]);
                SendClientMessageToAll(COLOR_ORANGE,String);
                }
            }
        return 1;
    }
   
    if(dialogid == teleports && response) // If you edit something in the actual dialog commands, edit this too. Be sure to make case numbers line up, too.
    {
        switch(listitem)
        {
            case 0: dcmd_stuntzones(playerid, "");
            case 1: dcmd_dmzones(playerid, "");
            case 2: dcmd_parkourzones(playerid, "");
            case 3: dcmd_otherzones(playerid, "");
        }
        return 1;
    }
    if(dialogid == stunting && response)
    {
        switch(listitem)
        {
            case 0: dcmd_bigjump(playerid, "");
            case 1: dcmd_bigjump2(playerid, "");
            case 2: dcmd_lstower(playerid, "");
            case 3: dcmd_buildingjump(playerid, "");
            case 4: dcmd_chilliad(playerid, "");
            case 5: dcmd_skatepark(playerid, "");
            case 6: dcmd_lvairport(playerid, "");
            case 7: dcmd_aquapark(playerid, "");
            case 8: dcmd_freeway(playerid, "");
            case 9: dcmd_deadjump(playerid, "");
            case 10: dcmd_wallride(playerid, "");
            case 11: dcmd_waytodeath(playerid, "");
            case 12: dcmd_stadium(playerid, "");
            case 13: dcmd_monstercrash(playerid, "");
            case 14: dcmd_drift(playerid, "");
        }
        return 1;
    }
   
    if(dialogid == deathmatchs && response)
    {
        switch(listitem)
        {
            case 0: dcmd_bloodringarena(playerid, "");
            case 1: dcmd_airbattle(playerid, "");
            case 2: dcmd_derby(playerid, "");
            case 3: dcmd_mgm(playerid, "");
            case 4: dcmd_gm(playerid, "");
            case 5: dcmd_sm(playerid, "");
            case 6: dcmd_rcwar(playerid, "");
        }
        return 1;
    }

    if(dialogid == others && response)
    {
        switch(listitem)
        {
            case 0: dcmd_home(playerid, "");
            case 1: dcmd_tune1(playerid, "");
            case 2: dcmd_tune2(playerid, "");
            case 3: dcmd_tune3(playerid, "");
            case 4: dcmd_tune4(playerid, "");
            case 5: dcmd_AA(playerid, "");
            case 6: dcmd_dragrace(playerid, "");
            case 7: dcmd_karting(playerid, "");
            case 8: dcmd_ctruckstop(playerid, "");
            case 9: dcmd_lsstation(playerid, "");
            case 10: dcmd_sfstation(playerid, "");
            case 11: dcmd_lvstation1(playerid, "");
            case 12: dcmd_lvstation2(playerid, "");
            case 13: dcmd_dtruckstop(playerid, "");
        }
        return 1;
    }
    return 1;
}
Reply
#7

Alright that helped now i get these warnings

pawn Код:
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(1465) : warning 219: local variable "String" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(2750) : warning 219: local variable "String" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(2761) : warning 219: local variable "String" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(2772) : warning 219: local variable "String" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(2783) : warning 219: local variable "String" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3087) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3110) : warning 219: local variable "Name" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3360) : warning 219: local variable "vehid" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3379) : warning 219: local variable "vehid" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3469) : warning 219: local variable "vehid" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3482) : warning 219: local variable "vehid" shadows a variable at a preceding level
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3563) : warning 217: loose indentation
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3594) : warning 217: loose indentation
C:\Users\EASYHOME\Desktop\UniverseOfStunting\gamemodes\UoS.pwn(3597) : warning 217: loose indentation
Reply
#8

That's because those variables are already defined, also, put return 1; after login so it would look like this..
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == register)
    {
        GetPlayerName(playerid, Name, sizeof(Name));
        format(file, sizeof(file), SERVER_USER_FILE, Name);
        if(!response) return Kick(playerid);
        if (!strlen(inputtext)) return
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Register", "Welcome, your not registered, please fill in a password", "Register", "Leave");
        dini_Create(file);
        dini_IntSet(file, "Password", udb_hash(inputtext));
        dini_IntSet(file, "AdminLevel",0);
        dini_IntSet(file, "Money",0);
        dini_IntSet(file, "Score",0);
        dini_IntSet(file, "Warns",0);
        format(String, 128, "[SYSTEM]: You succesfully registered the nickname %s with password %s, you have been auto logged in.", Name, inputtext);
        SendClientMessage(playerid, COLOR_YELLOW, String);
        gPlayerLogged[playerid] = 1;
        return l;
    }
    if (dialogid == login)
    {
        GetPlayerName(playerid, Name, sizeof(Name));
        format(file, sizeof(file), SERVER_USER_FILE, Name);
        if(!response) return Kick(playerid);
        if(!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login", "You're already registered, please login.", "Login", "Leave");
        new tmp;
        tmp = dini_Int(file, "Password");
        if(udb_hash(inputtext) != tmp)
        {
            SendClientMessage(playerid, COLOR_RED, "Wrong password");
            ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login", "You're already registered, please login.", "Login", "Leave");
        }
        else
        {
            gPlayerLogged[playerid] = 1;
            PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "AdminLevel");
            PlayerInfo[playerid][pScore] = dini_Int(file, "Score");
            PlayerInfo[playerid][pWarns] = dini_Int(file, "Warns");
            PlayerInfo[playerid][pCash] = dini_Int(file, "Money");

            Save[playerid] = SetTimerEx("SaveStats",1000,true,"i",playerid);
            SendClientMessage(playerid,COLOR_RED, "[SYSTEM]: Successfully logged in!");
            GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
            SetPlayerScore(playerid,PlayerInfo[playerid][pScore]);
            if(PlayerInfo[playerid][pAdminLevel] >0)
            {
            format(String,sizeof(String),"Admin %s has logged in",Name[playerid]);
            SendClientMessageToAll(COLOR_ORANGE,String);
            }
        }
        return 1;
    }

    if(dialogid == teleports && response) // If you edit something in the actual dialog commands, edit this too. Be sure to make case numbers line up, too.
    {
        switch(listitem)
        {
            case 0: dcmd_stuntzones(playerid, "");
            case 1: dcmd_dmzones(playerid, "");
            case 2: dcmd_parkourzones(playerid, "");
            case 3: dcmd_otherzones(playerid, "");
        }
        return 1;
    }
    if(dialogid == stunting && response)
    {
        switch(listitem)
        {
            case 0: dcmd_bigjump(playerid, "");
            case 1: dcmd_bigjump2(playerid, "");
            case 2: dcmd_lstower(playerid, "");
            case 3: dcmd_buildingjump(playerid, "");
            case 4: dcmd_chilliad(playerid, "");
            case 5: dcmd_skatepark(playerid, "");
            case 6: dcmd_lvairport(playerid, "");
            case 7: dcmd_aquapark(playerid, "");
            case 8: dcmd_freeway(playerid, "");
            case 9: dcmd_deadjump(playerid, "");
            case 10: dcmd_wallride(playerid, "");
            case 11: dcmd_waytodeath(playerid, "");
            case 12: dcmd_stadium(playerid, "");
            case 13: dcmd_monstercrash(playerid, "");
            case 14: dcmd_drift(playerid, "");
        }
        return 1;
    }

    if(dialogid == deathmatchs && response)
    {
        switch(listitem)
        {
            case 0: dcmd_bloodringarena(playerid, "");
            case 1: dcmd_airbattle(playerid, "");
            case 2: dcmd_derby(playerid, "");
            case 3: dcmd_mgm(playerid, "");
            case 4: dcmd_gm(playerid, "");
            case 5: dcmd_sm(playerid, "");
            case 6: dcmd_rcwar(playerid, "");
        }
        return 1;
    }

    if(dialogid == others && response)
    {
        switch(listitem)
        {
            case 0: dcmd_home(playerid, "");
            case 1: dcmd_tune1(playerid, "");
            case 2: dcmd_tune2(playerid, "");
            case 3: dcmd_tune3(playerid, "");
            case 4: dcmd_tune4(playerid, "");
            case 5: dcmd_AA(playerid, "");
            case 6: dcmd_dragrace(playerid, "");
            case 7: dcmd_karting(playerid, "");
            case 8: dcmd_ctruckstop(playerid, "");
            case 9: dcmd_lsstation(playerid, "");
            case 10: dcmd_sfstation(playerid, "");
            case 11: dcmd_lvstation1(playerid, "");
            case 12: dcmd_lvstation2(playerid, "");
            case 13: dcmd_dtruckstop(playerid, "");
        }
        return 1;
    }
    return 1;
}
Reply
#9

Quote:
Originally Posted by [ABK]Antonio
Посмотреть сообщение
That's because those variables are already defined, also, put return 1; after login so it would look like this..
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == register)
    {
        GetPlayerName(playerid, Name, sizeof(Name));
        format(file, sizeof(file), SERVER_USER_FILE, Name);
        if(!response) return Kick(playerid);
        if (!strlen(inputtext)) return
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Register", "Welcome, your not registered, please fill in a password", "Register", "Leave");
        dini_Create(file);
        dini_IntSet(file, "Password", udb_hash(inputtext));
        dini_IntSet(file, "AdminLevel",0);
        dini_IntSet(file, "Money",0);
        dini_IntSet(file, "Score",0);
        dini_IntSet(file, "Warns",0);
        format(String, 128, "[SYSTEM]: You succesfully registered the nickname %s with password %s, you have been auto logged in.", Name, inputtext);
        SendClientMessage(playerid, COLOR_YELLOW, String);
        gPlayerLogged[playerid] = 1;
        return l;
    }
    if (dialogid == login)
    {
        GetPlayerName(playerid, Name, sizeof(Name));
        format(file, sizeof(file), SERVER_USER_FILE, Name);
        if(!response) return Kick(playerid);
        if(!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login", "You're already registered, please login.", "Login", "Leave");
        new tmp;
        tmp = dini_Int(file, "Password");
        if(udb_hash(inputtext) != tmp)
        {
            SendClientMessage(playerid, COLOR_RED, "Wrong password");
            ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login", "You're already registered, please login.", "Login", "Leave");
        }
        else
        {
            gPlayerLogged[playerid] = 1;
            PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "AdminLevel");
            PlayerInfo[playerid][pScore] = dini_Int(file, "Score");
            PlayerInfo[playerid][pWarns] = dini_Int(file, "Warns");
            PlayerInfo[playerid][pCash] = dini_Int(file, "Money");

            Save[playerid] = SetTimerEx("SaveStats",1000,true,"i",playerid);
            SendClientMessage(playerid,COLOR_RED, "[SYSTEM]: Successfully logged in!");
            GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
            SetPlayerScore(playerid,PlayerInfo[playerid][pScore]);
            if(PlayerInfo[playerid][pAdminLevel] >0)
            {
            format(String,sizeof(String),"Admin %s has logged in",Name[playerid]);
            SendClientMessageToAll(COLOR_ORANGE,String);
            }
        }
        return 1;
    }

    if(dialogid == teleports && response) // If you edit something in the actual dialog commands, edit this too. Be sure to make case numbers line up, too.
    {
        switch(listitem)
        {
            case 0: dcmd_stuntzones(playerid, "");
            case 1: dcmd_dmzones(playerid, "");
            case 2: dcmd_parkourzones(playerid, "");
            case 3: dcmd_otherzones(playerid, "");
        }
        return 1;
    }
    if(dialogid == stunting && response)
    {
        switch(listitem)
        {
            case 0: dcmd_bigjump(playerid, "");
            case 1: dcmd_bigjump2(playerid, "");
            case 2: dcmd_lstower(playerid, "");
            case 3: dcmd_buildingjump(playerid, "");
            case 4: dcmd_chilliad(playerid, "");
            case 5: dcmd_skatepark(playerid, "");
            case 6: dcmd_lvairport(playerid, "");
            case 7: dcmd_aquapark(playerid, "");
            case 8: dcmd_freeway(playerid, "");
            case 9: dcmd_deadjump(playerid, "");
            case 10: dcmd_wallride(playerid, "");
            case 11: dcmd_waytodeath(playerid, "");
            case 12: dcmd_stadium(playerid, "");
            case 13: dcmd_monstercrash(playerid, "");
            case 14: dcmd_drift(playerid, "");
        }
        return 1;
    }

    if(dialogid == deathmatchs && response)
    {
        switch(listitem)
        {
            case 0: dcmd_bloodringarena(playerid, "");
            case 1: dcmd_airbattle(playerid, "");
            case 2: dcmd_derby(playerid, "");
            case 3: dcmd_mgm(playerid, "");
            case 4: dcmd_gm(playerid, "");
            case 5: dcmd_sm(playerid, "");
            case 6: dcmd_rcwar(playerid, "");
        }
        return 1;
    }

    if(dialogid == others && response)
    {
        switch(listitem)
        {
            case 0: dcmd_home(playerid, "");
            case 1: dcmd_tune1(playerid, "");
            case 2: dcmd_tune2(playerid, "");
            case 3: dcmd_tune3(playerid, "");
            case 4: dcmd_tune4(playerid, "");
            case 5: dcmd_AA(playerid, "");
            case 6: dcmd_dragrace(playerid, "");
            case 7: dcmd_karting(playerid, "");
            case 8: dcmd_ctruckstop(playerid, "");
            case 9: dcmd_lsstation(playerid, "");
            case 10: dcmd_sfstation(playerid, "");
            case 11: dcmd_lvstation1(playerid, "");
            case 12: dcmd_lvstation2(playerid, "");
            case 13: dcmd_dtruckstop(playerid, "");
        }
        return 1;
    }
    return 1;
}
dont follow you, lots of people need Strings in commands......
Reply
#10

These are some of the commands with strings and stuff

pawn Код:
dcmd_angry(playerid, params[])
    {
        #pragma unused params
        new name[MAX_PLAYER_NAME+1];
        new String[256];
        GetPlayerName(playerid, name, sizeof(name));
        format(String, sizeof(String), "%s is angry", name);
        SendClientMessageToAll(COLOR_GREY, String);
        return 1;
    }

   dcmd_happy(playerid, params[])
    {
        #pragma unused params
        new name[MAX_PLAYER_NAME+1];
        new String[256];
        GetPlayerName(playerid, name, sizeof(name));
        format(String, sizeof(String), "%s is happy", name);
        SendClientMessageToAll(COLOR_GREY, String);
        return 1;
    }

   dcmd_back(playerid, params[])
    {
        #pragma unused params
        new name[MAX_PLAYER_NAME+1];
        new String[256];
        GetPlayerName(playerid, name, sizeof(name));
        format(String, sizeof(String), "%s is back and ready to play", name);
        SendClientMessageToAll(COLOR_GREY, String);
        return 1;
    }

   dcmd_stoned(playerid, params[])
    {
        #pragma unused params
        new name[MAX_PLAYER_NAME+1];
        new String[256];
        GetPlayerName(playerid, name, sizeof(name));
        format(String, sizeof(String), "%s is stoned, woow men peace", name);
        SendClientMessageToAll(COLOR_GREY, String);
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)