Jump to content
  • 0

Problema compilare[Rezolvat]


Alexandru Alex

Question

Salut, incerc sa compilez un gamemode, dar e  o mica problema:

		format(gString, sizeof(gString), "Crates Type\tAmount\n{FFFFFF}Rare Crates\t{045AB6}%d\n{FFFFFF}Epic Crates\t{610F7D}%d\n{FFFFFF}Legendary Crates\t{eeba24}%d\nTranscendent Crates\t{e52222}%d\n{FFFFFF}Vehicle Crates\t{20F5F1}%d", playerVariables[playerid][pCrates][0], playerVariables[playerid][pCrates][1], playerVariables[playerid][pCrates][2], playerVariables[playerid][pCrates][3], playerVariables[playerid][pCrates][4]);
		ShowPlayerDialog(playerid, DIALOG_CRATES, DIALOG_STYLE_TABLIST_HEADERS, "My crates", gString, "Select", "Cancel");
 : error 001: expected token: ",", but found "["
 : error 029: invalid expression, assumed zero
 : warning 215: expression has no effect
 : fatal error 107: too many error messages on one line
Erori 

Ce e gresit?

Edited by Alexandru Alex
Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0
Acum 2 ore, Alexandru Alex a spus:

Salut, incerc sa compilez un gamemode, dar e  o mica problema:

		format(gString, sizeof(gString), "Crates Type\tAmount\n{FFFFFF}Rare Crates\t{045AB6}%d\n{FFFFFF}Epic Crates\t{610F7D}%d\n{FFFFFF}Legendary Crates\t{eeba24}%d\nTranscendent Crates\t{e52222}%d\n{FFFFFF}Vehicle Crates\t{20F5F1}%d", playerVariables[playerid][pCrates][0], playerVariables[playerid][pCrates][1], playerVariables[playerid][pCrates][2], playerVariables[playerid][pCrates][3], playerVariables[playerid][pCrates][4]);
		ShowPlayerDialog(playerid, DIALOG_CRATES, DIALOG_STYLE_TABLIST_HEADERS, "My crates", gString, "Select", "Cancel");
 : error 001: expected token: ",", but found "["
 : error 029: invalid expression, assumed zero
 : warning 215: expression has no effect
 : fatal error 107: too many error messages on one line
Erori 

Ce e gresit?

Da linia unde creiezi acea variabila pCrates.

  • Upvote 1

Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

Link to comment
Share on other sites

  • 0
4 hours ago, StrikerM said:

Da linia unde creiezi acea variabila pCrates.

        case DIALOG_BUYCRATES: {
            if(!response) 
                return true;

            format(gString, sizeof(gString), "Payment\tPrice\nBlack-Points\t{E26AF2}%d\nPremium Points\t{EEEE3F}%d", CratePrice[AlegeCrates[playerid]][0], CratePrice[AlegeCrates[playerid]][1]);
            ShowPlayerDialogEx(playerid, DIALOG_BUYCRATES1, DIALOG_STYLE_TABLIST_HEADERS, "Buy Crate", gString, "Da", "nu");
        }
        case DIALOG_BUYCRATES1: {
            if(!response) return true;
            new x = AlegeCrates[playerid];
            switch(listitem) {
                case 0: {
                    if(playerVariables[playerid][pBlackPoints] < CratePrice[x][0]) return SCM(playerid, -1, "Nu ai suficiente Black Points");
                    playerVariables[playerid][pBlackPoints] -= CratePrice[x][0];
                    format(gString, sizeof(gString), "(Crate Systems){FFFFFF} Ti-ai cumparat o cutie (%s) pentru {E26AF2}%d Black Points{FFFFFF}! Total cutii rare: %d [%d total - general]", CrateName[x], CratePrice[x][1], playerVariables[playerid][pCrates][x]+1, totalcrates(playerid)+1);
                    Update(playerid, pBlackPoints);
                }
                case 1: {
                    if(playerVariables[playerid][pPremiumPoints] < CratePrice[x][1]) return SCM(playerid, -1, "Nu ai suficiente puncte premium.");
                    playerVariables[playerid][pPremiumPoints] -= CratePrice[x][1];
                    format(gString, sizeof(gString), "(Crate Systems){FFFFFF} Ti-ai cumparat o cutie (%s) pentru {EEEE3F}%d PP{FFFFFF}! Total cutii rare: %d [%d total - general]", CrateName[x], CratePrice[x][1], playerVariables[playerid][pCrates][x]+1, totalcrates(playerid)+1);        
                    Update(playerid, pPremiumPoints);
                }
            }            
            SCM(playerid, -1, "Pentru a deschide o cuite, foloseste /opencrate.");
            playerVariables[playerid][pCrates][x] ++;
            save_crates(playerid);
        }

Link to comment
Share on other sites

  • 0
Acum 10 minute, Alexandru Alex a spus:

        case DIALOG_BUYCRATES: {
            if(!response) 
                return true;

            format(gString, sizeof(gString), "Payment\tPrice\nBlack-Points\t{E26AF2}%d\nPremium Points\t{EEEE3F}%d", CratePrice[AlegeCrates[playerid]][0], CratePrice[AlegeCrates[playerid]][1]);
            ShowPlayerDialogEx(playerid, DIALOG_BUYCRATES1, DIALOG_STYLE_TABLIST_HEADERS, "Buy Crate", gString, "Da", "nu");
        }
        case DIALOG_BUYCRATES1: {
            if(!response) return true;
            new x = AlegeCrates[playerid];
            switch(listitem) {
                case 0: {
                    if(playerVariables[playerid][pBlackPoints] < CratePrice[x][0]) return SCM(playerid, -1, "Nu ai suficiente Black Points");
                    playerVariables[playerid][pBlackPoints] -= CratePrice[x][0];
                    format(gString, sizeof(gString), "(Crate Systems){FFFFFF} Ti-ai cumparat o cutie (%s) pentru {E26AF2}%d Black Points{FFFFFF}! Total cutii rare: %d [%d total - general]", CrateName[x], CratePrice[x][1], playerVariables[playerid][pCrates][x]+1, totalcrates(playerid)+1);
                    Update(playerid, pBlackPoints);
                }
                case 1: {
                    if(playerVariables[playerid][pPremiumPoints] < CratePrice[x][1]) return SCM(playerid, -1, "Nu ai suficiente puncte premium.");
                    playerVariables[playerid][pPremiumPoints] -= CratePrice[x][1];
                    format(gString, sizeof(gString), "(Crate Systems){FFFFFF} Ti-ai cumparat o cutie (%s) pentru {EEEE3F}%d PP{FFFFFF}! Total cutii rare: %d [%d total - general]", CrateName[x], CratePrice[x][1], playerVariables[playerid][pCrates][x]+1, totalcrates(playerid)+1);        
                    Update(playerid, pPremiumPoints);
                }
            }            
            SCM(playerid, -1, "Pentru a deschide o cuite, foloseste /opencrate.");
            playerVariables[playerid][pCrates][x] ++;
            save_crates(playerid);
        }

ai gresit ceva nu e ceia ce ai dat prima data sus 

 Încearcă să fii un om de valoare și nu neapărat un om de succes.

 

Link to comment
Share on other sites

  • 0

Am grsit eu

26 minutes ago, KB.HERO said:

ai gresit ceva nu e ceia ce ai dat prima data sus 

(21602) : error 001: expected token: ",", but found "["
(21602) : error 029: invalid expression, assumed zero
(21602) : warning 215: expression has no effect
(21602) : error 001: expected token: ";", but found "]"
(21602) : fatal error 107: too many error messages on one line 

acestea sunt erorile, 

iar codul este:                      format(gString, sizeof(gString), "(Crate Systems){FFFFFF} Ti-ai cumparat o cutie (%s) pentru {E26AF2}%d Black Points{FFFFFF}! Total cutii rare: %d [%d total - general]", CrateName[x], CratePrice[x][1], playerVariables[playerid][pCrates][x]+1, totalcrates(playerid)+1);
                    Update(playerid, pBlackPoints);

Link to comment
Share on other sites

  • 0
Acum 45 minute, Alexandru Alex a spus:

Am grsit eu

(21602) : error 001: expected token: ",", but found "["
(21602) : error 029: invalid expression, assumed zero
(21602) : warning 215: expression has no effect
(21602) : error 001: expected token: ";", but found "]"
(21602) : fatal error 107: too many error messages on one line 

acestea sunt erorile, 

iar codul este:                      format(gString, sizeof(gString), "(Crate Systems){FFFFFF} Ti-ai cumparat o cutie (%s) pentru {E26AF2}%d Black Points{FFFFFF}! Total cutii rare: %d [%d total - general]", CrateName[x], CratePrice[x][1], playerVariables[playerid][pCrates][x]+1, totalcrates(playerid)+1);
                    Update(playerid, pBlackPoints);

Arata cod la linia aceasta . 21602

 Încearcă să fii un om de valoare și nu neapărat un om de succes.

 

Link to comment
Share on other sites

  • 0
36 minutes ago, KB.HERO said:

Arata cod la linia aceasta . 21602

format(gString, sizeof(gString), "(Crate Systems){FFFFFF} Ti-ai cumparat o cutie (%s) pentru {E26AF2}%d Black Points{FFFFFF}! Total cutii rare: %d [%d total - general]", CrateName[x], CratePrice[x][1], playerVariables[playerid][pCrates][x]+1, totalcrates(playerid)+1);
                    Update(playerid, pBlackPoints);

Link to comment
Share on other sites

  • 0
					format(gString, sizeof(gString), "(Crate Systems){FFFFFF} Ti-ai cumparat o cutie (%s) pentru {E26AF2}%d Black Points{FFFFFF}! Total cutii rare: %d [%d total - general]", CrateName[x], CratePrice[x][1], playerVariables[playerid][pCrates][x]+1, totalcrates(playerid)+1);
					Update(playerid, pBlackPoints);

 

Link to comment
Share on other sites

  • 0

@Alexandru Alex

Ai o problema la una dintre aceste variabile

CrateName[x], CratePrice[x][1], playerVariables[playerid][pCrates][x]+1

 

Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

Link to comment
Share on other sites

  • 0
11 minutes ago, StrikerM said:

@Alexandru Alex

Ai o problema la una dintre aceste variabile

CrateName[x], CratePrice[x][1], playerVariables[playerid][pCrates][x]+1

 

Am rezolvat aia, dar pot cumpara chiar daca nu am black points sau pp, ten imi scrie: Nu ai suficente premium points dar daca ma uit in /opencrate mi-o arata

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.

×
×
  • 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.