[Ajuda] Alguns erros chatos.
#8

Desculpem o double-post. Sei que tem algumas coisas erradas nesse GM, mais eu queria saber o que й. Poderia me ajudar?

Erros:

Код:
C:\Users\Leilson\Desktop\Sem Nome RPG\gamemodes\ADV.pwn(6) : warning 201: redefinition of constant/macro (symbol "DIALOG_STYLE_PASSWORD")
C:\Users\Leilson\Desktop\Sem Nome RPG\gamemodes\ADV.pwn(7) : warning 201: redefinition of constant/macro (symbol "DIALOG_STYLE_INPUT")
C:\Users\Leilson\Desktop\Sem Nome RPG\gamemodes\ADV.pwn(39) : error 029: invalid expression, assumed zero
C:\Users\Leilson\Desktop\Sem Nome RPG\gamemodes\ADV.pwn(43) : error 029: invalid expression, assumed zero
C:\Users\Leilson\Desktop\Sem Nome RPG\gamemodes\ADV.pwn(44) : error 017: undefined symbol "Spawnou"
C:\Users\Leilson\Desktop\Sem Nome RPG\gamemodes\ADV.pwn(44) : warning 215: expression has no effect
C:\Users\Leilson\Desktop\Sem Nome RPG\gamemodes\ADV.pwn(44) : error 001: expected token: ";", but found "]"
C:\Users\Leilson\Desktop\Sem Nome RPG\gamemodes\ADV.pwn(44) : error 029: invalid expression, assumed zero
C:\Users\Leilson\Desktop\Sem Nome RPG\gamemodes\ADV.pwn(44) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
pawn Код:
#include < a_samp >
#include < dof2 >

#define DIALOG_LOGAR
#define DIALOG_REGISTRO
#define DIALOG_STYLE_PASSWORD
#define DIALOG_STYLE_INPUT

new arquivo[40];
new name[MAX_PLAYER_NAME];

main() {
    print("====================================");
    print(" Game mode carregado com sucesso! ");
    print("====================================");
    print("    Scripter: Rafael Henrique |    ");
}
public OnGameModeInit() {
    DisableInteriorEnterExits();
    SetGameModeText("00/00/00 UPDATE#1");
    AddPlayerClass(0, 1642.1667, -2335.4941, 13.5469, 7.6790, 0, 0, 0, 0, 0, 0);
    return 1;
}
public OnGameModeExit() {
    DOF2_Exit();
    return 1;
}
public OnPlayerRequestClass(playerid, classid) {
    SetPlayerPos(playerid, 1094.0081, -934.7470, 1000.0987);
    SetPlayerCameraPos(playerid, 1094.0081, -934.7470, 157.0987);
    SetPlayerCameraLookAt(playerid, 1190.5789, -1060.4253, 76.4776);
    return 1;
}
public OnPlayerConnect(playerid) {
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    format(arquivo, 40, "Contas/%s.ini", name);
    if (DOF2_FileExists(arquivo))
    {
         ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Logar", "Vocк jб estб registrado em nosso banco de dados, digite sua senha para logar.", "Entrar", "Sair");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT, "Registro", "Vocк ainda nгo estб registrado em nosso banco de dados, digite uma senha para poder registrar.", "Confirmar", "Cancelar");
        Spawnou[playerid] = false;
        return true;
    }
    return 1;
}
public OnPlayerDisconnect(playerid, reason) {
    new arquivo[40];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    format(arquivo, 40, "Contas/%s.ini", name);
    if (DOF2_FileExists(arquivo)) {
        Player[playerid][Dinheiro] = GetPlayerMoney(playerid);
        DOF2_SetInt(arquivo, "Senha", Player[playerid][Senha]);
        DOF2_SetInt(arquivo, "Matou", Player[playerid][Matou]);
        DOF2_SetInt(arquivo, "Morreu", Player[playerid][Morreu]);
        DOF2_SetInt(arquivo, "Dinheiro", Player[playerid][Dinheiro]);
        DOF2_SetInt(arquivo, "Vida", Player[playerid][Vida]);
        DOF2_SaveFile();
    }
    return 1;
}
public OnPlayerSpawn(playerid) {
    if (Spawnou[playerid] == false) {
        Spawnou[playerid] = true;
        SetPlayerPos(playerid, DOF2::GetFloat(SalvarCoord(playerid), "Coordenada X"), DOF2::GetFloat(SalvarCoord(playerid), "Coordenada Y"), DOF2::GetFloat(SalvarCoord(playerid), "Coordenada Z"));
    }
    return true;
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason) {
    return 1;
}
public OnVehicleSpawn(vehicleid) {
    return 1;
}
public OnVehicleDeath(vehicleid, killerid) {
    return 1;
}
public OnPlayerText(playerid, text[]) {
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[]) {
    if (strcmp("/mycommand", cmdtext, true, 10) == 0) {
        // Do something here
        return 1;
    }
    return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) {
    return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid) {
    return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate) {
    return 1;
}
public OnPlayerEnterCheckpoint(playerid) {
    return 1;
}
public OnPlayerLeaveCheckpoint(playerid) {
    return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid) {
    return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid) {
    return 1;
}
public OnRconCommand(cmd[]) {
    return 1;
}
public OnPlayerRequestSpawn(playerid) {
    return 1;
}
public OnObjectMoved(objectid) {
    return 1;
}
public OnPlayerObjectMoved(playerid, objectid) {
    return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid) {
    return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid) {
    return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid) {
    return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2) {
    return 1;
}
public OnPlayerSelectedMenuRow(playerid, row) {
    return 1;
}
public OnPlayerExitedMenu(playerid) {
    return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid) {
    return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {
    return 1;
}
public OnRconLoginAttempt(ip[], password[], success) {
    return 1;
}
public OnPlayerUpdate(playerid) {
    return 1;
}
public OnPlayerStreamIn(playerid, forplayerid) {
    return 1;
}
public OnPlayerStreamOut(playerid, forplayerid) {
    return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid) {
    return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid) {
    return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
    new arquivo[40];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    format(arquivo, 40, "Contas/%s.ini", name);
    if (dialogid == DIALOG_REGISTRO) {
        if (!strval(inputtext)) {
            ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT, "Registro", "Por favor, digite apenas nъmeros em sua senha!\nPor favor, digite sua senha novamente para concluir seu registro!", "Confirma", "Cancelar");
            DOF2_CreateFile(arquivo);
            return 1;
        }
        if (!response) {
            Kick(playerid);
            return 1;
        } else {
            Player[playerid][Dinheiro] = GivePlayerMoney(playerid, 1500);
            Player[playerid][Vida] = SetPlayerHealth(playerid, 50);
            DOF2_SetInt(arquivo, "Senha", Player[playerid][Senha]);
            DOF2_SetInt(arquivo, "Matou", Player[playerid][Matou]);
            DOF2_SetInt(arquivo, "Morreu", Player[playerid][Morreu]);
            DOF2_SetInt(arquivo, "Dinheiro", Player[playerid][Dinheiro]);
            DOF2_SetInt(arquivo, "Vida", Player[playerid][Vida]);
            DOF2_SaveFile();
            ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Logar", "Vocк acabou de se registrar no servidor, por favor digite sua senha.!", "Confirma", "Cancelar");
        }
    }
    if (dialogid == DIALOG_LOGAR) {
        if (!response) {
            SendClientMessage(playerid, -1, "Como vocк nгo quis logar, vocк irб se desconectar do servidor.");
            Kick(playerid);
        }
        if (response) {
            new file[32];
            GetPlayerName(playerid, name, MAX_PLAYER_NAME);
            format(file, sizeof(file), "Contas/%s.ini", name);
            if (DOF2_FileExists(file)) {
                if (DOF2_CheckLogin(file, inputtext)) {
                    SendClientMessage(playerid, -1, "Logado com sucesso");
                    return 1;
                } else {
                    ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Logar", "Por favor, digite apenas nъmeros em sua senha.\nPor favor, digite sua senha para poder logar!", "Confirmar", "Cancelar");
                }
            }
        }
    }
    return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source) {
    return 1;
}
Reply


Messages In This Thread
Alguns erros chatos. - by sofina - 24.01.2013, 13:38
Re: Alguns erros chatos. - by Wellington1999 - 24.01.2013, 14:03
Re: Alguns erros chatos. - by Smoking_Script - 24.01.2013, 14:12
Re: Alguns erros chatos. - by Mteck - 24.01.2013, 14:15
Re: Alguns erros chatos. - by Smoking_Script - 24.01.2013, 14:16
Re: Alguns erros chatos. - by Copom_policia - 24.01.2013, 14:21
Re: Alguns erros chatos. - by sofina - 24.01.2013, 15:19
Re: Alguns erros chatos. - by sofina - 24.01.2013, 16:17
Re: Alguns erros chatos. - by JonathanFeitosa - 24.01.2013, 16:21
Re: Alguns erros chatos. - by Schocc - 24.01.2013, 16:24

Forum Jump:


Users browsing this thread: 1 Guest(s)