Jump to content
  • 0

Problema copilare( comanda)


PolloDate

Question

Problema intalnita (descriere):Salut, am incercat sa copilez si eu gm dupa ce am introdus codul comenzii de mai jos da imi da o eroare.
Ero(area / rile) / warning-(ul / urile):

E:\GTA-MP\gamemodes\GTA-MP.pwn(24433) : error 017: undefined symbol "szMessage"
E:\GTA-MP\gamemodes\GTA-MP.pwn(24433) : error 017: undefined symbol "szMessage"
E:\GTA-MP\gamemodes\GTA-MP.pwn(24433) : error 029: invalid expression, assumed zero
E:\GTA-MP\gamemodes\GTA-MP.pwn(24433) : fatal error 107: too many error messages on one line


Liniile de cod / sursa / script-ul(obligatoriu):

CMD:factionss(playerid, params[])
{
    new members;
    format(szMessage, sizeof(szMessage),"Factions:"); Asta e linia cu problema...
    for(new xf = 0; xf < MAX_GROUPS; xf++)
    {
        if(strlen(groupVariables[xf][gGroupName]) >= 1 && strcmp(groupVariables[xf][gGroupName], "None", true))
        {
            new stringy2[256];
            mysql_format(handle, stringy2, 256, "SELECT * FROM `users` WHERE  `Member` = '%d'", xf);
            new Cache: resultx = mysql_query (handle, stringy2);
            members = cache_get_row_count();
            cache_delete(resultx);
            format(szMessage, sizeof(szMessage),"%s\n[%d/%d] %s ", szMessage, members, groupVariables[xf][gSlots], groupVariables[xf][gGroupName]);
        }
    }
    ShowPlayerDialog(playerid, 4500, DIALOG_STYLE_LIST,"Server: Factions", szMessage, "Select", "Cancel");
    SelFaction[playerid] = 0;
    return 1;
}

Imagini / Video (optional): http://imgur.com/OR8sQWR
Ati incercat sa rezolvati singur?: Da am incercat sa rezolv, dar sunt incepator si am cautat peste tot o asemenea comanda.Daca mai puteti sa imi spuneti si ce date sa mai pun la mysql_format daca tot am facut acest topic(poza cu baza de date e putin mai sus si cu categoriile pe care le am in aceasta)Daca se poate vreau rezolvare pentru ambele probleme si cea de sus dar si pentru cea de jos.Multumesc!

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0
  • 0

Am pus 700 pentru ca este un dialog de factiuni, si are nevoie de variabile si de culori. Mesajul meu cu factiuni are 780 de caractere si stringul este de 800 pentru ca am 17 factiuni si scrie "membri/10 liderul ultimul login lider etc" mai putin de 800 de caractere nu pot pune la stringul meu. Ma gandeam ca decat sa faca dupa un topic cu problema nu mi se vad factiunile mai bine sa  aiba stringul mai mare. Nu pune degeaba ca mai multe ca daca pune toate factiunile cele 100 de caractere din string se duc imediat

Edited by Mister

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0

ce? 300 ? the fuck

new szMessage[100]; , mai mult nu pune, pui degeaba. 

Acum a intervenit alta eroare....

E:\GTA-MP\gamemodes\GTA-MP.pwn(24439) : error 028: invalid subscript (not an array or too many subscripts): "groupVariables"
E:\GTA-MP\gamemodes\GTA-MP.pwn(24439) : warning 215: expression has no effect
E:\GTA-MP\gamemodes\GTA-MP.pwn(24439) : error 001: expected token: ";", but found "]"
E:\GTA-MP\gamemodes\GTA-MP.pwn(24439) : error 029: invalid expression, assumed zero
E:\GTA-MP\gamemodes\GTA-MP.pwn(24439) : fatal error 107: too many error messages on one line

Ce pot sa schimb la linia aia sa nu imi mai dea eroare(e vorba de a 7-a linie din script-ul de mai sus)

Link to comment
Share on other sites

  • 0

Incearca asta :

CMD:factionss(playerid, params[])
{
    new members,szMessage[155];
    format(szMessage, sizeof(szMessage),"Factions:");// Asta e linia cu problema...
    for(new xf = 0; xf < MAX_GROUPS; xf++)
    {
        if(strlen(groupVariables[xf][gGroupName]) >= 1 && strcmp(groupVariables[xf][gGroupName], "None", true))
        {
            new stringy2[256];
            mysql_format(handle, stringy2, 256, "SELECT * FROM `users` WHERE  `Member` = '%d'", xf);
            new Cache: resultx = mysql_query (handle, stringy2);
            members = cache_get_row_count();
            cache_delete(resultx);
            format(szMessage, sizeof(szMessage),"%s\n[%d/%d] %s ", szMessage, members, groupVariables[xf][gSlots], groupVariables[xf][gGroupName]);
        }
    }
    ShowPlayerDialog(playerid, 4500, DIALOG_STYLE_LIST,"Server: Factions", szMessage, "Select", "Cancel");
    SelFaction[playerid] = 0;
    return 1;
}

 

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0

Incearca asta :

CMD:factionss(playerid, params[])
{
    new members,szMessage[155];
    format(szMessage, sizeof(szMessage),"Factions:");// Asta e linia cu problema...
    for(new xf = 0; xf < MAX_GROUPS; xf++)
    {
        if(strlen(groupVariables[xf][gGroupName]) >= 1 && strcmp(groupVariables[xf][gGroupName], "None", true))
        {
            new stringy2[256];
            mysql_format(handle, stringy2, 256, "SELECT * FROM `users` WHERE  `Member` = '%d'", xf);
            new Cache: resultx = mysql_query (handle, stringy2);
            members = cache_get_row_count();
            cache_delete(resultx);
            format(szMessage, sizeof(szMessage),"%s\n[%d/%d] %s ", szMessage, members, groupVariables[xf][gSlots], groupVariables[xf][gGroupName]);
        }
    }
    ShowPlayerDialog(playerid, 4500, DIALOG_STYLE_LIST,"Server: Factions", szMessage, "Select", "Cancel");
    SelFaction[playerid] = 0;
    return 1;
}

 

Man am rezolvat prima problema acum mi-a dat alta

E:\GTA-MP\gamemodes\GTA-MP.pwn(24439) : error 028: invalid subscript (not an array or too many subscripts): "groupVariables"
E:\GTA-MP\gamemodes\GTA-MP.pwn(24439) : warning 215: expression has no effect
E:\GTA-MP\gamemodes\GTA-MP.pwn(24439) : error 001: expected token: ";", but found "]"
E:\GTA-MP\gamemodes\GTA-MP.pwn(24439) : error 029: invalid expression, assumed zero
E:\GTA-MP\gamemodes\GTA-MP.pwn(24439) : fatal error 107: too many error messages on one line

 

CMD:factionss(playerid, params[])
{
    new members,szMessage[155];
    format(szMessage, sizeof(szMessage),"Factions:");// Asta e linia cu problema...
    for(new xf = 0; xf < MAX_GROUPS; xf++)
    {
        if(strlen(groupVariables[xf][gGroupName]) >= 1 && strcmp(groupVariables[xf][gGroupName], "None", true))Aici e problema!!!!!!!!!!!!!!!!
        {
            new stringy2[256];
            mysql_format(handle, stringy2, 256, "SELECT * FROM `users` WHERE  `Member` = '%d'", xf);
            new Cache: resultx = mysql_query (handle, stringy2);
            members = cache_get_row_count();
            cache_delete(resultx);
            format(szMessage, sizeof(szMessage),"%s\n[%d/%d] %s ", szMessage, members, groupVariables[xf][gSlots], groupVariables[xf][gGroupName]);
        }
    }
    ShowPlayerDialog(playerid, 4500, DIALOG_STYLE_LIST,"Server: Factions", szMessage, "Select", "Cancel");
    SelFaction[playerid] = 0;
    return 1;
}

 

Link to comment
Share on other sites

  • 0

Man am rezolvat prima problema acum mi-a dat alta

E:\GTA-MP\gamemodes\GTA-MP.pwn(24439) : error 028: invalid subscript (not an array or too many subscripts): "groupVariables"
E:\GTA-MP\gamemodes\GTA-MP.pwn(24439) : warning 215: expression has no effect
E:\GTA-MP\gamemodes\GTA-MP.pwn(24439) : error 001: expected token: ";", but found "]"
E:\GTA-MP\gamemodes\GTA-MP.pwn(24439) : error 029: invalid expression, assumed zero
E:\GTA-MP\gamemodes\GTA-MP.pwn(24439) : fatal error 107: too many error messages on one line

 

CMD:factionss(playerid, params[])
{
    new members,szMessage[155];
    format(szMessage, sizeof(szMessage),"Factions:");// Asta e linia cu problema...
    for(new xf = 0; xf < MAX_GROUPS; xf++)
    {
        if(strlen(groupVariables[xf][gGroupName]) >= 1 && strcmp(groupVariables[xf][gGroupName], "None", true))Aici e problema!!!!!!!!!!!!!!!!
        {
            new stringy2[256];
            mysql_format(handle, stringy2, 256, "SELECT * FROM `users` WHERE  `Member` = '%d'", xf);
            new Cache: resultx = mysql_query (handle, stringy2);
            members = cache_get_row_count();
            cache_delete(resultx);
            format(szMessage, sizeof(szMessage),"%s\n[%d/%d] %s ", szMessage, members, groupVariables[xf][gSlots], groupVariables[xf][gGroupName]);
        }
    }
    ShowPlayerDialog(playerid, 4500, DIALOG_STYLE_LIST,"Server: Factions", szMessage, "Select", "Cancel");
    SelFaction[playerid] = 0;
    return 1;
}

 

Arata linia 24439 .

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.