Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×
  • 0

Problema compilare GM


Question

Posted

Problema intalnita (descriere): Imi da 4 erori la un Dialog
Ero(area / rile) / warning-(ul / urile): 

 


C:\Users\Paul\Desktop\GameMode\GameMode\gamemodes\ThePyrex.pwn(33415) : error 029: invalid expression, assumed zero
C:\Users\Paul\Desktop\GameMode\GameMode\gamemodes\ThePyrex.pwn(33415) : error 017: undefined symbol "DialogString"
C:\Users\Paul\Desktop\GameMode\GameMode\gamemodes\ThePyrex.pwn(33415) : error 029: invalid expression, assumed zero
C:\Users\Paul\Desktop\GameMode\GameMode\gamemodes\ThePyrex.pwn(33415) : fatal error 107: too many error messages on one line

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


4 Errors.


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

 

//------------------------------------------------------------------------------------------//
    if(strcmp(cmd, "/car", true) == 0)
    {
    if(IsPlayerConnected(playerid))
        {
                new carkey = PlayerData[playerid][pPcarkey];
                new carkey2 = PlayerData[playerid][pPcarkey2];
                new carkey3 = PlayerData[playerid][pPcarkey3];
                new carkey4 = PlayerData[playerid][pPcarkey4];
                new carkey5 = PlayerData[playerid][pPcarkey5];

                if(carkey != 999 && carkey != 0)
                {
                    format(string, sizeof(string), "Model: %s  Valoare: %d | Incuiat: %d |  Numar: %s", CarData[carkey][cDescription], CarData[carkey][cValue], CarData[carkey][cLockk], CarData[carkey][cNum]);
                    ShowPlayerDialog(playerid, DIALOG_V, DIALOG_STYLE_LIST, "Masini personale", DialogString, "Select", "Close");
                }
                 if(carkey2 != 999 && carkey2 != 0)
                {
                    format(string, sizeof(string), "Model: %s  Valoare: %d | Incuiat: %d |  Numar: %s", CarData[carkey2][cDescription], CarData[carkey2][cValue], CarData[carkey2][cLockk], CarData[carkey2][cNum]);
                    ShowPlayerDialog(playerid, DIALOG_V, DIALOG_STYLE_LIST, "Masini personale", DialogString, "Select", "Close");
                }
                if(carkey3 != 999 && carkey3 != 0)
                {
                    format(string, sizeof(string), "Model: %s  Valoare: %d | Incuiat: %d |  Numar: %s", CarData[carkey3][cDescription], CarData[carkey3][cValue], CarData[carkey3][cLockk], CarData[carkey3][cNum]);
                    ShowPlayerDialog(playerid, DIALOG_V, DIALOG_STYLE_LIST, "Masini personale", DialogString, "Select", "Close");
                }
                if(carkey4 != 999 && carkey4 != 0)
                {
                    format(string, sizeof(string), "Model: %s  Valoare: %d | Incuiat: %d |  Numar: %s", CarData[carkey4][cDescription], CarData[carkey4][cValue], CarData[carkey4][cLockk], CarData[carkey4][cNum]);
                    ShowPlayerDialog(playerid, DIALOG_V, DIALOG_STYLE_LIST, "Masini personale", DialogString, "Select", "Close");
                }
                if(carkey5 != 999 && carkey5 != 0)
                {
                    format(string, sizeof(string), "Model: %s  Valoare: %d | Incuiat: %d |  Numar: %s", CarData[carkey5][cDescription], CarData[carkey5][cValue], CarData[carkey5][cLockk], CarData[carkey5][cNum]);
                    ShowPlayerDialog(playerid, DIALOG_V, DIALOG_STYLE_LIST, "Masini personale", DialogString, "Select", "Close");
                }
                return 1;
        }

//----------------------------------------------------------------------------------------------------//


Imagini / Video (optional):
Ati incercat sa rezolvati singur?: Da, nu am reusit

11 answers to this question

Recommended Posts

  • 0
Posted

In primul rand nu faci 2 posturi findca asa vrei tu!

In al doilea rand,vezi ca ai pus de 4 ori ShowPlayerDialog

Vezi in postul de l-am atasat aici si zimi daca merge.

  • Upvote 1

 

 

  • 0
Posted (edited)

Pune dupa   

Citat

new carkey5 = PlayerData[playerid][pPcarkey5];

Asta: 

new  DialogString [128];

 

Edited by Rochester
  • 0
Posted

Am pus si eute :

C:\Users\shady\Desktop\GameMode The Pyrex\GameMode Pyrex\gamemodes\ThePyrex.pwn(33416) : error 029: invalid expression, assumed zero
C:\Users\shady\Desktop\GameMode The Pyrex\GameMode Pyrex\gamemodes\ThePyrex.pwn(33416) : error 001: expected token: ";", but found ")"
C:\Users\shady\Desktop\GameMode The Pyrex\GameMode Pyrex\gamemodes\ThePyrex.pwn(33416) : error 029: invalid expression, assumed zero
C:\Users\shady\Desktop\GameMode The Pyrex\GameMode Pyrex\gamemodes\ThePyrex.pwn(33416) : fatal error 107: too many error messages on one line

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


4 Errors.
 

33416: ShowPlayerDialog(playerid, DIALOG_V, DIALOG_STYLE_LIST, "Masini personale", DialogString, "Select", "Close");

  • 0
Posted

Pai frate tu in 

ShowPlayerDialog(playerid, DIALOG_V, DIALOG_STYLE_LIST, "Masini personale", DialogString, "Select", "Close");

Ai  DialogString  si in 

format(string, sizeof... bla bla bla ai string.

Rezolvare: 

In loc de 

new  DialogString [128];

Pune : 

new  string [128];

Si la dialoguri schimba din DialogString in string .

 

  • 0
Posted

Am pus si tot 4 erori..

C:\Users\shady\Desktop\GameMode The Pyrex\GameMode Pyrex\gamemodes\ThePyrex.pwn(33411) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\shady\Desktop\GameMode The Pyrex\GameMode Pyrex\gamemodes\ThePyrex.pwn(33416) : error 029: invalid expression, assumed zero
C:\Users\shady\Desktop\GameMode The Pyrex\GameMode Pyrex\gamemodes\ThePyrex.pwn(33416) : error 001: expected token: ";", but found ")"
C:\Users\shady\Desktop\GameMode The Pyrex\GameMode Pyrex\gamemodes\ThePyrex.pwn(33416) : error 029: invalid expression, assumed zero
C:\Users\shady\Desktop\GameMode The Pyrex\GameMode Pyrex\gamemodes\ThePyrex.pwn(33416) : fatal error 107: too many error messages on one line

  • 0
Posted

Incearca asa

inainte de: new carkey = PlayerData[playerid][pPcarkey]; sau dupa new carkey5 = PlayerData[playerid][pPcarkey5];
Adauga asta:
new string[128];

Si la dialog:

ShowPlayerDialog(playerid, DIALOG_V, DIALOG_STYLE_LIST, "Masini personale", string , "Select", "Close");

  • 0
Posted
36 minutes ago, Alcapone12 said:

Incearca asa


inainte de: new carkey = PlayerData[playerid][pPcarkey]; sau dupa new carkey5 = PlayerData[playerid][pPcarkey5];
Adauga asta:
new string[128];

Si la dialog:

ShowPlayerDialog(playerid, DIALOG_V, DIALOG_STYLE_LIST, "Masini personale", string , "Select", "Close");

aceliasi erori..

  • 0
Posted (edited)

Inseamna ca mai ai odata definit new string .. > Incearca sa-l stergi sau sai pui o valoare mai mare de 128. 

Edited by Rochester
  • 0
Posted

Pune deasupra scriptului new DialogString[200]; si gata -_-.

Ai grija sa fie aliniat cu celelalte scripturi.

242086.png

  • 0
Posted
10 hours ago, KnowN said:

Pune deasupra scriptului new DialogString[200]; si gata -_-.

Ai grija sa fie aliniat cu celelalte scripturi.

Am facut acest pas de 5 ori..imi apar mereu 4 erori la randul  33416

  • 0
Posted
3 hours ago, SupremAngel. said:

Am facut acest pas de 5 ori..imi apar mereu 4 erori la randul  33416

Ce ai facut cu DialogString ? Ca , pentru a pune DialogString in loc de "Mesajul in sine\nAlt mesaj..." trebuie sa folosesti DialogString la ceva , ca si format-ul , cand scrii intr-un string . Tu , la ce l-ai folosit ?

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.