Jump to content
  • 0

Erori sistem logare


thestafy

Question

primesc urmatoarele erori: 

C:\Users\Daniel\Desktop\svsamp\gamemodes\Gamemode_v1.0.pwn(14) : error 001: expected token: ";", but found "enum"
C:\Users\Daniel\Desktop\svsamp\gamemodes\Gamemode_v1.0.pwn(37) : warning 213: tag mismatch
C:\Users\Daniel\Desktop\svsamp\gamemodes\Gamemode_v1.0.pwn(57) : warning 213: tag mismatch
C:\Users\Daniel\Desktop\svsamp\gamemodes\Gamemode_v1.0.pwn(57) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Daniel\Desktop\svsamp\gamemodes\Gamemode_v1.0.pwn(57) : error 001: expected token: ";", but found ")"
C:\Users\Daniel\Desktop\svsamp\gamemodes\Gamemode_v1.0.pwn(57) : error 029: invalid expression, assumed zero
C:\Users\Daniel\Desktop\svsamp\gamemodes\Gamemode_v1.0.pwn(57) : fatal error 107: too many error messages on one line

are cineva idee?

 

aici este si scriptul: 

#include <a_samp>

#include <a_mysql>
new SQL = -1, gQuery[256], gString[256];

#define function%0(%1)         forward %0(%1); public %0(%1)
#define SCM                    SendClientMessage

#define COLOR_DARKRED         0XD80003FF

new 
    incercariParola[MAX_PLAYERS]

enum pInfo {
    pSQLID,
    pName[MAX_PLAYER_NAME],
    pPassword[32],
    pEmail[32],
    pGender
}
new PlayerInfo[MAX_PLAYERS][pInfo];

enum {
    //REGISTER
    DIALOG_REGISTER,
    DIALOG_EMAIL,
    DIALOG_GENDER,
    
    //LOGIN
    DIALOG_LOGIN
}

main() { print("Se initiaza gamemodeul..."); }

public OnGameModeInit()
{
    SQL = mysql_connect("localhos" , "root" , "sv" , "");
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}


public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerConnect(playerid){
    incercariParola[playerid] = 0;

    gQuery[0] = EOS;
     mysql_format(SQL, gQuery, sizeof(gQuery), "SELECT * FROM 'users' WHERE 'Name' = '%s' LIMIT 1" GetName(playerid));
    mysql_tquery(SQL, gQuery, "checkAccount" , "i" , playerid);
    return 1;
}

public OnDialgResponse(playerid, dialogid, response, listitem, inputtext[]) {
    switch(dialogid) {
    case DIALOG_REGISTER: {
            if(!response)
                return Kick(playerid);
                
            if(strlen(inputtext) <4 || strlen(inputtext) > 32)
            return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", "Scrie o parola pentru a iti crea contul:", "Select", "Cancel");
            
               gQuery[0] = EOS;
            mysql_format(SQL, gQuery, sizeof(qQuery), "INSERT INTO 'users' ('Name' , 'Password') VALUES ('%s' , '%s')" , GetName(playerid), inputtext);
            mysql_tquery(SQL, gQuery, "insertAccount", "i" , playerid );

            gString[0] = EOS;
            format(gString, sizeof(gString), "Parola ta contine %d caractere." strlen(inputtext));
            SCM(playerid, -1 , gString);

            format(PlayerInfo[playerid][pPassword], 32 , inputtext);

            ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "EMAIL", "Te rugam sa-ti setezi adresa de email:", "Select", "Cancel");
        }
        case DIALOG_EMAIL: {
            if(!response)
                return Kick(playerid);
                
            if(strlen(inputtext) <4 || strlen(inputtext) > 32)
            return ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "EMAIL", "Te rugam sa-ti setezi adresa de email:", "Select", "Cancel");

            gQuery[0] = EOS;
            mysql_format(SQL, gQuery, sizeof(qQuery), "UPDATE 'Users' SET 'Email = '%s' WHERE 'ID' = '%d'" , inputtext, PlayerInfo[playerid][pSQLID]);
            mysql_tquery(SQL, gQuery, "", "" );

            gString[0] = EOS;
            format(gString, sizeof(gString), "Email setat %s" strlen(inputtext));
            SCM(playerid, -1 , gString);

            format(PlayerInfo[playerid][pEmail], 32 , inputtext);

            ShowPlayerDialog(playerid, DIALOG_GENDER, DIALOG_STYLE_MSGBOX, "GENDER", "Seteaza-ti sexul:", "Masculin", "Feminin");
        }
        case DIALOG_GENDER: {
            switch(response) {
                case 0: {
                    PlayerInfo[playerid][pGender] = 1;
                    SCM(playerid, -1, "Sexul ales este Feminin");
                }
                case 1: {
                    PlayerInfo[playerid][pGender] = 0;
                    SCM(playerid, -1, "Sexul ales este Masculin");
            }
        }
        gQuery[0] = EOS;
            mysql_format(SQL, gQuery, sizeof(qQuery), "UPDATE 'Users' SET 'Gender = '%d' WHERE 'ID' = '%d'" , PlayerInfo[playerid][pGender], PlayerInfo[playerid][pSQLID]);
            mysql_tquery(SQL, gQuery, "", "" );
            
            SpawnPlayer(playerid);
        }
            case DIALOG_LOGIN: {
                if(!response)
                    return Kick(playerid);

            mysql_format(SQL, gQuery, sizeof(gQuery), "SELECT * FROM 'users' WHERE Name' = '%s' AND 'Password'='%s' LIMIT 1" GetName(playerid)inputtext);
            mysql_tquery(SQL, gQuery, "onlogin" , "i" , playerid);
        }
    }
    return 1;
}

function onlogin (playerid) {
    switch(cache_num_rows()) {
        case 0: {
            incercariParola[playerid] ++;

            gString[0] = EOS;
            format(gString, sizeof(gString),"Parola incorecta! (%d/3 incercari ramase)", incercariParola[playerid]);
            SCM(palyerid, COLOR_DARKRED, gString);

            if(incercariParola[playerid] == 3) Kick(playerid);
            else ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Te rugam sa introduci parola contului tau:", "Select", "Cancel");
        }
        case 1: {
            new
                result[64];

            PlayerInfo[playerid][pSQLID] = cache_get_row_content_int("0", "ID");
            PlayerInfo[playerid][pGender] = cache_get_row_content_int("0", "Gender");

            cache_get_field_content(0, "Name" , result); format(PLayerInfo[playerid][pName], MAX_PLAYER_NAME, result);
            cache_get_field_content(0, "Password" , result); format(PLayerInfo[playerid][pPassword], 32, result);
            cache_get_field_content(0, "Email" , result); format(PLayerInfo[playerid][pEmail], 32, result);

            printf("%s (user: %d) s-a conectat. [Gender: %d, Name: %s, Password: %s, Email: %s]" , GetName(playerid), PlayerInfo[playerid][pSQLID], PlayerInfo[playerid][pGender],PlayerInfo[playerid][pPassword], PlayerInfo[palyerid][pEmail]);
        }
    }
    return 1;
}

function insertAccount(playerid) {
    PlayerInfo[playerid][pSQLID] = cache_insert_id();
    printf("%s s-a inregistrat cu SQLID-ul #%d." , GetName(playerid),PlayerInfo[playerid][pSQLID]);
    return 1;
}
function checkAccount(playerid) {
    switch(cache_num_rows()) {
     case 0; ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", "Scrie o parola pentru a iti crea contul:", "Select", "Cancel");
     case 1;ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Te rugam sa introduci parola contului tau:", "Select", "Cancel");
    }
    return 1;
}

stock GetName(playerid) {
    new playerName[MAX_PALYER_NAME];
    GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
    return playerName;
}

Edited by thestafy
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

#include <a_samp>

#include <a_mysql>
new SQL = -1, gQuery[256], gString[256];

#define function%0(%1)         forward %0(%1); public %0(%1)
#define SCM                    SendClientMessage

#define COLOR_DARKRED         0XD80003FF

new 
    incercariParola[MAX_PLAYERS];

enum pInfo {
    pSQLID,
    pName[MAX_PLAYER_NAME],
    pPassword[32],
    pEmail[32],
    pGender
}
new PlayerInfo[MAX_PLAYERS][pInfo];

enum {
    //REGISTER
    DIALOG_REGISTER,
    DIALOG_EMAIL,
    DIALOG_GENDER,
    
    //LOGIN
    DIALOG_LOGIN
};

main() { print("Se initiaza gamemodeul..."); }

public OnGameModeInit()
{
    SQL = mysql_connect("localhos" , "root" , "sv" , "");
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}


public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerConnect(playerid){
    incercariParola[playerid] = 0;

    gQuery[0] = EOS;
     mysql_format(SQL, gQuery, sizeof(gQuery), "SELECT * FROM 'users' WHERE 'Name' = '%s' LIMIT 1" GetName(playerid));
    mysql_tquery(SQL, gQuery, "checkAccount" , "i" , playerid);
    return 1;
}

public OnDialgResponse(playerid, dialogid, response, listitem, inputtext[]) {
    switch(dialogid) {
    case DIALOG_REGISTER: {
            if(!response)
                return Kick(playerid);
                
            if(strlen(inputtext) <4 || strlen(inputtext) > 32)
            return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", "Scrie o parola pentru a iti crea contul:", "Select", "Cancel");
            
               gQuery[0] = EOS;
            mysql_format(SQL, gQuery, sizeof(qQuery), "INSERT INTO 'users' ('Name' , 'Password') VALUES ('%s' , '%s')" , GetName(playerid), inputtext);
            mysql_tquery(SQL, gQuery, "insertAccount", "i" , playerid );

            gString[0] = EOS;
            format(gString, sizeof(gString), "Parola ta contine %d caractere." strlen(inputtext));
            SCM(playerid, -1 , gString);

            format(PlayerInfo[playerid][pPassword], 32 , inputtext);

            ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "EMAIL", "Te rugam sa-ti setezi adresa de email:", "Select", "Cancel");
        }
        case DIALOG_EMAIL: {
            if(!response)
                return Kick(playerid);
                
            if(strlen(inputtext) <4 || strlen(inputtext) > 32)
            return ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "EMAIL", "Te rugam sa-ti setezi adresa de email:", "Select", "Cancel");

            gQuery[0] = EOS;
            mysql_format(SQL, gQuery, sizeof(qQuery), "UPDATE 'Users' SET 'Email = '%s' WHERE 'ID' = '%d'" , inputtext, PlayerInfo[playerid][pSQLID]);
            mysql_tquery(SQL, gQuery, "", "" );

            gString[0] = EOS;
            format(gString, sizeof(gString), "Email setat %s" strlen(inputtext));
            SCM(playerid, -1 , gString);

            format(PlayerInfo[playerid][pEmail], 32 , inputtext);

            ShowPlayerDialog(playerid, DIALOG_GENDER, DIALOG_STYLE_MSGBOX, "GENDER", "Seteaza-ti sexul:", "Masculin", "Feminin");
        }
        case DIALOG_GENDER: {
            switch(response) {
                case 0: {
                    PlayerInfo[playerid][pGender] = 1;
                    SCM(playerid, -1, "Sexul ales este Feminin");
                }
                case 1: {
                    PlayerInfo[playerid][pGender] = 0;
                    SCM(playerid, -1, "Sexul ales este Masculin");
            }
        }
        gQuery[0] = EOS;
            mysql_format(SQL, gQuery, sizeof(qQuery), "UPDATE 'Users' SET 'Gender = '%d' WHERE 'ID' = '%d'" , PlayerInfo[playerid][pGender], PlayerInfo[playerid][pSQLID]);
            mysql_tquery(SQL, gQuery, "", "" );
            
            SpawnPlayer(playerid);
        }
            case DIALOG_LOGIN: {
                if(!response)
                    return Kick(playerid);

            mysql_format(SQL, gQuery, sizeof(gQuery), "SELECT * FROM 'users' WHERE Name' = '%s' AND 'Password'='%s' LIMIT 1" GetName(playerid)inputtext);
            mysql_tquery(SQL, gQuery, "onlogin" , "i" , playerid);
        }
    }
    return 1;
}

function onlogin (playerid) {
    switch(cache_num_rows()) {
        case 0: {
            incercariParola[playerid] ++;

            gString[0] = EOS;
            format(gString, sizeof(gString),"Parola incorecta! (%d/3 incercari ramase)", incercariParola[playerid]);
            SCM(palyerid, COLOR_DARKRED, gString);

            if(incercariParola[playerid] == 3) Kick(playerid);
            else ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Te rugam sa introduci parola contului tau:", "Select", "Cancel");
        }
        case 1: {
            new
                result[64];

            PlayerInfo[playerid][pSQLID] = cache_get_row_content_int("0", "ID");
            PlayerInfo[playerid][pGender] = cache_get_row_content_int("0", "Gender");

            cache_get_field_content(0, "Name" , result); format(PLayerInfo[playerid][pName], MAX_PLAYER_NAME, result);
            cache_get_field_content(0, "Password" , result); format(PLayerInfo[playerid][pPassword], 32, result);
            cache_get_field_content(0, "Email" , result); format(PLayerInfo[playerid][pEmail], 32, result);

            printf("%s (user: %d) s-a conectat. [Gender: %d, Name: %s, Password: %s, Email: %s]" , GetName(playerid), PlayerInfo[playerid][pSQLID], PlayerInfo[playerid][pGender],PlayerInfo[playerid][pPassword], PlayerInfo[palyerid][pEmail]);
        }
    }
    return 1;
}

function insertAccount(playerid) {
    PlayerInfo[playerid][pSQLID] = cache_insert_id();
    printf("%s s-a inregistrat cu SQLID-ul #%d." , GetName(playerid),PlayerInfo[playerid][pSQLID]);
    return 1;
}
function checkAccount(playerid) {
    switch(cache_num_rows()) {
     case 0; ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", "Scrie o parola pentru a iti crea contul:", "Select", "Cancel");
     case 1;ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Te rugam sa introduci parola contului tau:", "Select", "Cancel");
    }
    return 1;
}

stock GetName(playerid) {
    new playerName[MAX_PALYER_NAME];
    GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
    return playerName;
}

Link to comment
Share on other sites

  • 0
Acum 7 ore, hanako a spus:

#include <a_samp>

#include <a_mysql>
new SQL = -1, gQuery[256], gString[256];

#define function%0(%1)         forward %0(%1); public %0(%1)
#define SCM                    SendClientMessage

#define COLOR_DARKRED         0XD80003FF

new 
    incercariParola[MAX_PLAYERS];

enum pInfo {
    pSQLID,
    pName[MAX_PLAYER_NAME],
    pPassword[32],
    pEmail[32],
    pGender
}
new PlayerInfo[MAX_PLAYERS][pInfo];

enum {
    //REGISTER
    DIALOG_REGISTER,
    DIALOG_EMAIL,
    DIALOG_GENDER,
    
    //LOGIN
    DIALOG_LOGIN
};

main() { print("Se initiaza gamemodeul..."); }

public OnGameModeInit()
{
    SQL = mysql_connect("localhos" , "root" , "sv" , "");
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}


public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerConnect(playerid){
    incercariParola[playerid] = 0;

    gQuery[0] = EOS;
     mysql_format(SQL, gQuery, sizeof(gQuery), "SELECT * FROM 'users' WHERE 'Name' = '%s' LIMIT 1" GetName(playerid));
    mysql_tquery(SQL, gQuery, "checkAccount" , "i" , playerid);
    return 1;
}

public OnDialgResponse(playerid, dialogid, response, listitem, inputtext[]) {
    switch(dialogid) {
    case DIALOG_REGISTER: {
            if(!response)
                return Kick(playerid);
                
            if(strlen(inputtext) <4 || strlen(inputtext) > 32)
            return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", "Scrie o parola pentru a iti crea contul:", "Select", "Cancel");
            
               gQuery[0] = EOS;
            mysql_format(SQL, gQuery, sizeof(qQuery), "INSERT INTO 'users' ('Name' , 'Password') VALUES ('%s' , '%s')" , GetName(playerid), inputtext);
            mysql_tquery(SQL, gQuery, "insertAccount", "i" , playerid );

            gString[0] = EOS;
            format(gString, sizeof(gString), "Parola ta contine %d caractere." strlen(inputtext));
            SCM(playerid, -1 , gString);

            format(PlayerInfo[playerid][pPassword], 32 , inputtext);

            ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "EMAIL", "Te rugam sa-ti setezi adresa de email:", "Select", "Cancel");
        }
        case DIALOG_EMAIL: {
            if(!response)
                return Kick(playerid);
                
            if(strlen(inputtext) <4 || strlen(inputtext) > 32)
            return ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "EMAIL", "Te rugam sa-ti setezi adresa de email:", "Select", "Cancel");

            gQuery[0] = EOS;
            mysql_format(SQL, gQuery, sizeof(qQuery), "UPDATE 'Users' SET 'Email = '%s' WHERE 'ID' = '%d'" , inputtext, PlayerInfo[playerid][pSQLID]);
            mysql_tquery(SQL, gQuery, "", "" );

            gString[0] = EOS;
            format(gString, sizeof(gString), "Email setat %s" strlen(inputtext));
            SCM(playerid, -1 , gString);

            format(PlayerInfo[playerid][pEmail], 32 , inputtext);

            ShowPlayerDialog(playerid, DIALOG_GENDER, DIALOG_STYLE_MSGBOX, "GENDER", "Seteaza-ti sexul:", "Masculin", "Feminin");
        }
        case DIALOG_GENDER: {
            switch(response) {
                case 0: {
                    PlayerInfo[playerid][pGender] = 1;
                    SCM(playerid, -1, "Sexul ales este Feminin");
                }
                case 1: {
                    PlayerInfo[playerid][pGender] = 0;
                    SCM(playerid, -1, "Sexul ales este Masculin");
            }
        }
        gQuery[0] = EOS;
            mysql_format(SQL, gQuery, sizeof(qQuery), "UPDATE 'Users' SET 'Gender = '%d' WHERE 'ID' = '%d'" , PlayerInfo[playerid][pGender], PlayerInfo[playerid][pSQLID]);
            mysql_tquery(SQL, gQuery, "", "" );
            
            SpawnPlayer(playerid);
        }
            case DIALOG_LOGIN: {
                if(!response)
                    return Kick(playerid);

            mysql_format(SQL, gQuery, sizeof(gQuery), "SELECT * FROM 'users' WHERE Name' = '%s' AND 'Password'='%s' LIMIT 1" GetName(playerid)inputtext);
            mysql_tquery(SQL, gQuery, "onlogin" , "i" , playerid);
        }
    }
    return 1;
}

function onlogin (playerid) {
    switch(cache_num_rows()) {
        case 0: {
            incercariParola[playerid] ++;

            gString[0] = EOS;
            format(gString, sizeof(gString),"Parola incorecta! (%d/3 incercari ramase)", incercariParola[playerid]);
            SCM(palyerid, COLOR_DARKRED, gString);

            if(incercariParola[playerid] == 3) Kick(playerid);
            else ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Te rugam sa introduci parola contului tau:", "Select", "Cancel");
        }
        case 1: {
            new
                result[64];

            PlayerInfo[playerid][pSQLID] = cache_get_row_content_int("0", "ID");
            PlayerInfo[playerid][pGender] = cache_get_row_content_int("0", "Gender");

            cache_get_field_content(0, "Name" , result); format(PLayerInfo[playerid][pName], MAX_PLAYER_NAME, result);
            cache_get_field_content(0, "Password" , result); format(PLayerInfo[playerid][pPassword], 32, result);
            cache_get_field_content(0, "Email" , result); format(PLayerInfo[playerid][pEmail], 32, result);

            printf("%s (user: %d) s-a conectat. [Gender: %d, Name: %s, Password: %s, Email: %s]" , GetName(playerid), PlayerInfo[playerid][pSQLID], PlayerInfo[playerid][pGender],PlayerInfo[playerid][pPassword], PlayerInfo[palyerid][pEmail]);
        }
    }
    return 1;
}

function insertAccount(playerid) {
    PlayerInfo[playerid][pSQLID] = cache_insert_id();
    printf("%s s-a inregistrat cu SQLID-ul #%d." , GetName(playerid),PlayerInfo[playerid][pSQLID]);
    return 1;
}
function checkAccount(playerid) {
    switch(cache_num_rows()) {
     case 0; ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", "Scrie o parola pentru a iti crea contul:", "Select", "Cancel");
     case 1;ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Te rugam sa introduci parola contului tau:", "Select", "Cancel");
    }
    return 1;
}

stock GetName(playerid) {
    new playerName[MAX_PALYER_NAME];
    GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
    return playerName;
}

still: 

C:\Users\Daniel\Desktop\svsamp\gamemodes\Gamemode_v1.0.pwn(37) : warning 213: tag mismatch
C:\Users\Daniel\Desktop\svsamp\gamemodes\Gamemode_v1.0.pwn(57) : warning 217: loose indentation
C:\Users\Daniel\Desktop\svsamp\gamemodes\Gamemode_v1.0.pwn(57) : warning 213: tag mismatch
C:\Users\Daniel\Desktop\svsamp\gamemodes\Gamemode_v1.0.pwn(57) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Daniel\Desktop\svsamp\gamemodes\Gamemode_v1.0.pwn(57) : error 001: expected token: ";", but found ")"
C:\Users\Daniel\Desktop\svsamp\gamemodes\Gamemode_v1.0.pwn(57) : error 029: invalid expression, assumed zero
C:\Users\Daniel\Desktop\svsamp\gamemodes\Gamemode_v1.0.pwn(57) : fatal error 107: too many error messages on one line

Link to comment
Share on other sites

  • 0
Acum 20 minute, andy47 a spus:

Salut @thestafy.

La linia 57 ai uitat sa pui o virgula. 

da,ma dau batut :))) deja primesc alte erori

C:\Users\danie\Dropbox\svsamp\gamemodes\Gamemode_v1.0.pwn(57) : warning 217: loose indentation
C:\Users\danie\Dropbox\svsamp\gamemodes\Gamemode_v1.0.pwn(62) : warning 235: public function lacks forward declaration (symbol "OnDialgResponse")
C:\Users\danie\Dropbox\svsamp\gamemodes\Gamemode_v1.0.pwn(72) : error 017: undefined symbol "qQuery"
C:\Users\danie\Dropbox\svsamp\gamemodes\Gamemode_v1.0.pwn(72) : error 029: invalid expression, assumed zero
C:\Users\danie\Dropbox\svsamp\gamemodes\Gamemode_v1.0.pwn(72) : warning 215: expression has no effect
C:\Users\danie\Dropbox\svsamp\gamemodes\Gamemode_v1.0.pwn(76) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\danie\Dropbox\svsamp\gamemodes\Gamemode_v1.0.pwn(76) : error 001: expected token: ";", but found ")"
C:\Users\danie\Dropbox\svsamp\gamemodes\Gamemode_v1.0.pwn(76) : error 029: invalid expression, assumed zero
C:\Users\danie\Dropbox\svsamp\gamemodes\Gamemode_v1.0.pwn(76) : fatal error 107: too many error messages on one line

.
nu e de mine

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By TheGodfather
      Salut! Ma gandeam daca merita implementarea unui sistem /svf, prin care masinile de la factiuni nu se spawneaza toate o data ci fiecare player isi spawneaza o masina pentru el. Afecteaza acest lucru in vreun fel performanta server-ului incat sa merite? 
    • By 1code
      Sistem de pet. unul clasic, dar il impartasesc si cu voi. Cei ce-l vor, il pot descarca de aici: https://www.facebook.com/s4urik
       





    • By TheGodfather
      Salut, la gamemode-ul bhood hpq123 am observat ca dupa ce dau restart, turfurile se pun aiurea in /turfs. Cu siguranta mai sunt si alte probleme la sistemul de war. Aveti idee cum pot rezolva? Las mai jos ce tine de sistemul de war.
      YCMD:turfs(playerid, params[], help) {
          if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d seconds.", aspam[playerid]);
          if(TurfsDisp[playerid] == 0) {
              TurfsDisp[playerid] = 1;
              for(new i = 0; i < sizeof(Turfs); i++) 
              {
                  switch(TurfInfo[i][zOwned]) {
                      case 0: GangZoneShowForPlayerEx(playerid, Turfs[i], 0xFFFFFFAA); //None
                      case 4: GangZoneShowForPlayerEx(playerid, Turfs[i], 0x0CAB3C99); //Grove Street
                      case 5: GangZoneShowForPlayerEx(playerid, Turfs[i], 0x11F2F299); //Los Vagos
                      case 6: GangZoneShowForPlayerEx(playerid, Turfs[i], 0x8E541099); //Ballas
                      case 10: GangZoneShowForPlayerEx(playerid, Turfs[i], 0xAB00FA99); //Los Aztecas
                  }
              }
              SCM(playerid, -1, "You activated the turfs.");
          } else {
              TurfsDisp[playerid] = 0;
              for(new i = 0; i < sizeof(Turfs); i++) GangZoneHideForPlayerEx(playerid, Turfs[i]);
              SCM(playerid, -1, "You deactivated the turfs.");
          }
          return true;
      }
      function SQL_loadTurfs() {
          printf("Turfs: %d", cache_num_rows());    
          if(cache_num_rows() == 0)
              return true;
          new ORM:ormid;
           for(new i = 0; i < cache_num_rows(); i++) {
               ormid = orm_create("turfs");
               orm_addvar_int(ormid, TurfInfo[i][zID], "ID");
               orm_addvar_int(ormid, TurfInfo[i][zOwned], "Owned");
               orm_addvar_float(ormid, TurfInfo[i][zMinX], "MinX");
               orm_addvar_float(ormid, TurfInfo[i][zMinY], "MinY");
               orm_addvar_float(ormid, TurfInfo[i][zMaxX], "MaxX");
               orm_addvar_float(ormid, TurfInfo[i][zMaxY], "MaxY");
               orm_apply_cache(ormid, i);    
          }    
          for(new i = 0; i < sizeof(TurfInfo); i++) Turfs[i] = GangZoneCreateEx(TurfInfo[i][zMinX],TurfInfo[i][zMinY],TurfInfo[i][zMaxX],TurfInfo[i][zMaxY],TurfInfo[i][zID],1.0);
          return true;
      }
      Functia SQL_loadTurfs este folosita la OnGamemodeInit astfel: mysql_tquery(SQL, "SELECT * FROM `turfs`", "SQL_loadTurfs", "");
      function OtherTimer() {
          new stringg[180], iswar;
          for(new w = 0; w < 16; w++) if(InWar[w] == 1) iswar = 1;
          if(iswar != 1)
              return true;
          for(new i = 0; i < sizeof(Turfs); i++) {
              new attackers = WarInfo[i][wAttacker];
              new defenders = WarInfo[i][wFaction];
              if(WarInfo[i][wTime] >= 2) {
                  foreach(Player,j) {
                      if(PlayerInfo[j][pMember] == attackers || PlayerInfo[j][pMember] == defenders) {
                          if(WarInfo[i][wAttacker] == 4) GangZoneFlashForPlayer(j,Turfs[i], 0x0CAB3C99);
                          else if(WarInfo[i][wAttacker] == 5) GangZoneFlashForPlayer(j,Turfs[i], 0x11F2F299);
                          else if(WarInfo[i][wAttacker] == 6) GangZoneFlashForPlayer(j,Turfs[i], 0x8E541099);
                          else if(WarInfo[i][wAttacker] == 10) GangZoneFlashForPlayer(j,Turfs[i], 0xAB00FA99);
                      }
                  }
              }
              if(WarInfo[i][wTime] > 0) {
                  WarInfo[i][wTime] -= 1;
                  foreach(Player,j) {
                      if(IsPlayerInTurf(j,i) == 1) {
                          if(PlayerInfo[j][pMember] == attackers) WarScoreF[attackers][i] += 0.002;
                          if(PlayerInfo[j][pMember] == defenders) WarScoreF[defenders][i] += 0.002;
                      }
                  }
                  if(WarInfo[i][wTime] == 1) {
                      new Float: atscore = 0.0;
                      new Float: defscore = 0.0;
                      atscore = WarScoreF[attackers][i];
                      defscore = WarScoreF[defenders][i];
                      new winner;
                      SetVehicle(attackers, 0);
                      SetVehicle(defenders, 0);
                      foreach(Player,j) {
                          if(PlayerInfo[j][pMember] == attackers) {
                              SCM(j, COLOR_MONEY, "--------------------- WAR Statistics ---------------------");
                              RespawnVehicle(attackers);
                              GangZoneStopFlashForPlayer(j,Turfs[i]);
                              format(stringg,sizeof(stringg),"War between %s and %s for turf %d is over.",FactionName(attackers),FactionName(defenders),i+1);
                              SCM(j, COLOR_MONEY,stringg);
                              //for(new m = 0; m < 5; m++) SendDeathMessageToPlayer(j, 1001, 1001, 200);
                              PlayerTextDrawHide(j, WarTime);
                          }
                          if(PlayerInfo[j][pMember] == defenders) {
                              SCM(j, COLOR_MONEY, "--------------------- WAR Statistics ---------------------");
                              RespawnVehicle(defenders);
                              GangZoneStopFlashForPlayer(j,Turfs[i]);
                              format(stringg,sizeof(stringg),"War between %s and %s for turf %d is over.",FactionName(attackers),FactionName(defenders),i);
                              SCM(j, COLOR_MONEY,stringg);
                              //for(new m = 0; m < 5; m++) SendDeathMessageToPlayer(j, 1001, 1001, 200);
                              PlayerTextDrawHide(j, WarTime);
                          }
                      }
                      DestroyPickups(i);
                      if(atscore > defscore) winner = 1;
                      else winner = 2;
                      new winbest, losebest;
                      new winbestj = -1, losebestj = -1;
                      new bestname1[25],bestname2[25],bestname[25],worstname[25];
                      FactionDeelay[attackers] = 300;
                      foreach(Player,j) {
                          if(winner == 1) {
                              if(PlayerInfo[j][pMember] == attackers) {
                                  winbest = bestscoreat[i];
                                  if(bestmemberat[i] != 999) {
                                      if(PlayerInfo[bestmemberat[i]][pMember] == attackers) {
                                          winbestj = bestmemberat[i];
                                          GetPlayerName(winbestj,bestname1,sizeof(bestname1));
                                          strmid(bestname, bestname1, 0, strlen(bestname1), 255);
                                      }
                                  }
                                  else {
                                      format(bestname,sizeof(bestname),"Null");
                                      strmid(bestname, bestname, 0, strlen(bestname), 255);
                                  }
                              }
                              if(PlayerInfo[j][pMember] == defenders) {
                                  losebest = worstscoredf[i];
                                  if(worstmemberdf[i] != 999) {
                                      if(PlayerInfo[worstmemberdf[i]][pMember] == defenders) {
                                          losebestj = worstmemberdf[i];
                                          GetPlayerName(losebestj,bestname2,sizeof(bestname2));
                                          strmid(worstname, bestname2, 0, strlen(bestname2), 255);
                                      }
                                  }
                                  else {
                                      format(worstname,sizeof(worstname),"Null");
                                      strmid(worstname, worstname, 0, strlen(worstname), 255);
                                  }
                              }
                          }
                          if(winner == 2) {
                              if(PlayerInfo[j][pMember] == defenders) {
                                  winbest = bestscoredf[i];
                                  if(bestmemberdf[i] != 999) {
                                      if(PlayerInfo[bestmemberdf[i]][pMember] == defenders) {
                                          winbestj = bestmemberdf[i];
                                          GetPlayerName(winbestj,bestname1,sizeof(bestname1));
                                          strmid(bestname, bestname1, 0, strlen(bestname1), 255);
                                      }
                                  }
                                  else {
                                      format(bestname,sizeof(bestname),"Null");
                                      strmid(bestname, bestname, 0, strlen(bestname), 255);
                                  }
                              }
                              if(PlayerInfo[j][pMember] == attackers) {
                                  losebest = worstscoreat[i];
                                  if(worstmemberat[i] != 999) {
                                      if(PlayerInfo[worstmemberat[i]][pMember] == attackers) {
                                          losebestj = worstmemberat[i];
                                          GetPlayerName(losebestj,bestname2,sizeof(bestname2));
                                          strmid(worstname, bestname2, 0, strlen(bestname2), 255);
                                      }
                                  }
                                  else {
                                      format(worstname,sizeof(worstname),"Null");
                                      strmid(worstname, worstname, 0, strlen(worstname), 255);
                                  }
                              }
                          }
                      }
                      foreach(Player,j) {
                          new uciderii = 0;
                          uciderii += ucideri[j][i];
                          new decesee = 0;
                          decesee += decese[j][i];
                          ucideri[j][i] = 0;
                          decese[j][i] = 0;
                          
                          if((PlayerInfo[j][pMember] == attackers) || (PlayerInfo[j][pMember] == defenders)) {
                              SetPlayerVirtualWorld(j, 0);
                              if(WarSeconds[j] >= 300) {
                                  //UpdateFactionRaport(j, 0);
                                  //edisonraport
                                  AddRaportPoint(j);
                                  //edisonraport
                              }
                              WarSeconds[j] = 0;
                              if(winner == 1) {                    
                                  format(stringg,sizeof(stringg),"%s (%.1f) vs %s (%.1f).",FactionName(WarInfo[i][wAttacker]),atscore,FactionName(WarInfo[i][wFaction]),defscore);
                                  SCM(j, COLOR_MONEY,stringg);
                                  format(stringg,sizeof(stringg),"The best: %s (%d). The worst: %s (-%d).", bestname, winbest, worstname, losebest);
                                  SCM(j, COLOR_MONEY,stringg);
                                  format(stringg,sizeof(stringg),"Your statistics: Score %d (%d kills and %d deaths).",uciderii-decesee, uciderii, decesee);
                                  SCM(j, COLOR_MONEY,stringg);
                                  TurfInfo[i][zOwned] = WarInfo[i][wAttacker];
                                  Wartimeon[j] = 0;
                              }
                              if(winner == 2) {
                                  format(stringg,sizeof(stringg),"%s (%.1f) vs %s (%.1f).",FactionName(WarInfo[i][wFaction]),defscore,FactionName(WarInfo[i][wAttacker]),atscore);
                                  SCM(j, COLOR_MONEY,stringg);
                                  format(stringg,sizeof(stringg),"The best: %s (%d). The worst: %s (-%d).", bestname, winbest, worstname, losebest);
                                  SCM(j, COLOR_MONEY,stringg);
                                  format(stringg,sizeof(stringg),"Your statistics: Score %d (%d kills and %d deaths).",uciderii-decesee,uciderii, decesee);
                                  SCM(j, COLOR_MONEY,stringg);
                                  Wartimeon[j] = 0;
                              }
                              SCM(j, COLOR_MONEY, "---------------------------------------------------------------");
                              WarScoreF[defenders][i] = 0.0;
                              WarScoreF[attackers][i] = 0.0;
                              InWar[attackers] = 0;
                              InWar[defenders] = 0;
                          }
                          if(winner == 1) {
                              GangZoneHideForPlayerEx(j,Turfs[i]);
                              if(attackers == 4) GangZoneShowForPlayerEx(j,Turfs[i],0x0CAB3C99);
                              if(attackers == 5) GangZoneShowForPlayerEx(j,Turfs[i],0x11F2F299);
                              if(attackers == 6) GangZoneShowForPlayerEx(j,Turfs[i],0x8E541099);
                              if(attackers == 10) GangZoneShowForPlayerEx(j,Turfs[i],0xAB00FA99);
                          }
                      }
                      if(winner == 1) {
                          new str[128];
                          mysql_format(SQL, str,128,"UPDATE `turfs` SET `Owned`='%d' WHERE `ID`='%d'",TurfInfo[i][zOwned],i);
                          mysql_tquery(SQL,str, "", "");
                      }
                      WarInfo[i][wTime] = 0;
                      WarInfo[i][wFaction] = 0;
                      WarInfo[i][wAttacker] = 0;
                      worstscoreat[i] = 0;
                      worstmemberat[i] = 999;
                      bestscoreat[i] = 0;
                      bestmemberat[i] = 999;
                      worstscoredf[i] = 0;
                      worstmemberdf[i] = 999;
                      bestscoredf[i] = 0;
                      bestmemberdf[i] = 999;
                      mysql_tquery(SQL, "UPDATE `users` SET `WarTurf`='0', `WarKills`='0', `WarDeaths`='0'", "", "");
                  }
              }
          }
          return true;
      }
    • By R4zvyy
      C:\Users\R4zvyy\Desktop\moon-times (noua)\pawno\include\YSI\y_hooks.inc(64) : fatal error 111: user error: Did you do <YSI/y_hooks> instead of the required <YSI\y_hooks>?
      Compilation aborted.
      Pawn compiler 3.10.8              Copyright (c) 1997-2006, ITB CompuPhase

      1 Error.
      ===========
      #include        <YSI\y_hooks>
      #include         <YSI\y_iterate>
      #include        <YSI\y_stringhash>
      #include         <YSI\y_commands>
      #include         <YSI\y_master>
      #include         <YSI\y_timers>
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.