error 010: invalid function or declaration
#1

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
        if (gPlayerAccount[playerid] != 0)
        {
            new loginstring[128];
            new loginname[64];
            GetPlayerName(playerid, loginname, sizeof(loginname));
            format(loginstring, sizeof(loginstring), "Gamarjoba %s!\nEs niki Daregistrirebulia.\nShegidzlia Shexvide:", loginname);
            PlayerPlaySound(playerid, 1187,-119.9460,23.1096,12.2238);
            DOO_SetPlayerPos(playerid,1679.3274,1447.8716,47.7780);
            SetPlayerFacingAngle(playerid,273.2993);
            SetPlayerCameraPos(playerid,1679.3274+5,1447.8716,47.7780+2);
            SetPlayerCameraLookAt(playerid,1679.3274,1447.8716,47.7780);
            ShowPlayerDialog(playerid, 12346, DIALOG_STYLE_INPUT, "Shesvla", loginstring, "Shesvla", "Gasvla");
        }
        else
        {
            gPlayerAccount[playerid] = 0;
            new regstring[128];
            new regname[64];
            GetPlayerName(playerid, regname, sizeof(regname));
                    PlayerPlaySound(playerid, 1187,-119.9460,23.1096,12.2238);
        DOO_SetPlayerPos(playerid,1679.3274,1447.8716,47.7780);
        SetPlayerFacingAngle(playerid,273.2993);
        SetPlayerCameraPos(playerid,1679.3274+5,1447.8716,47.7780+2);
        SetPlayerCameraLookAt(playerid,1679.3274,1447.8716,47.7780);
            format(regstring, sizeof(regstring), "Gamarjoba %s!\nShen Ar Gyavs Sheni Personaji.\nShegidzlia Daregistrirde:", regname);
            ShowPlayerDialog(playerid, 12345, DIALOG_STYLE_INPUT, "Registracia", regstring, "Registracia", "Gasvla");
        }
        SetTimerEx("FixCamera", 1000, false, "i", playerid);
    }
    return 1; // error on this line
}
Reply
#2

You had an extra bracket.
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if (gPlayerAccount[playerid] != 0)
    {
        new loginstring[128];
        new loginname[64];
        GetPlayerName(playerid, loginname, sizeof(loginname));
        format(loginstring, sizeof(loginstring), "Gamarjoba %s!\nEs niki Daregistrirebulia.\nShegidzlia Shexvide:", loginname);
        PlayerPlaySound(playerid, 1187,-119.9460,23.1096,12.2238);
        DOO_SetPlayerPos(playerid,1679.3274,1447.8716,47.7780);
        SetPlayerFacingAngle(playerid,273.2993);
        SetPlayerCameraPos(playerid,1679.3274+5,1447.8716,47.7780+2);
        SetPlayerCameraLookAt(playerid,1679.3274,1447.8716,47.7780);
        ShowPlayerDialog(playerid, 12346, DIALOG_STYLE_INPUT, "Shesvla", loginstring, "Shesvla", "Gasvla");
    }
    else
    {
        gPlayerAccount[playerid] = 0;
        new regstring[128];
        new regname[64];
        GetPlayerName(playerid, regname, sizeof(regname));
        PlayerPlaySound(playerid, 1187,-119.9460,23.1096,12.2238);
        DOO_SetPlayerPos(playerid,1679.3274,1447.8716,47.7780);
        SetPlayerFacingAngle(playerid,273.2993);
        SetPlayerCameraPos(playerid,1679.3274+5,1447.8716,47.7780+2);
        SetPlayerCameraLookAt(playerid,1679.3274,1447.8716,47.7780);
        format(regstring, sizeof(regstring), "Gamarjoba %s!\nShen Ar Gyavs Sheni Personaji.\nShegidzlia Daregistrirde:", regname);
        ShowPlayerDialog(playerid, 12345, DIALOG_STYLE_INPUT, "Registracia", regstring, "Registracia", "Gasvla");
    }
    SetTimerEx("FixCamera", 1000, false, "i", playerid);
    return 1;
}
Reply
#3

pawn Код:
}//Remove this bracket
    return 1; // error on this line
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)