Jump to content

error 014: invalid statement; not in switch


MihaiMrn43

Recommended Posts

case DIALOG_BITCOINEXCHANGE1: {
    if(!response) return 1;
    ShowPlayerDialog(playerid, DIALOG_BITCOINEXCHANGE2, DIALOG_STYLE_LIST, "Ce operatiune doresti sa efectuezi?","Vanzare BTC\nCumparare BTC", "Selecteaza", "Anuleaza");
}
case DIALOG_BITCOINEXCHANGE2: {
    if(!response) return 1;
    if(listitem == 0) {
        //vanzare 
        format(string,sizeof(string),"{FFFFFF}Cati BTC doresti sa vinzi? Vei primi {23E800}$%s{FFFFFF} pentru fiecare BTC. (Cantitate minima: 0.1BTC)",FormatNumber(btcprice));
        ShowPlayerDialog(playerid,DIALOG_BITCOINEXCHANGE3,DIALOG_STYLE_INPUT,"Vanzare BTC - Bitcoin Exchange",string,"Ok","Anuleaza");
    }
    else {
        //cumparare 
        format(string,sizeof(string),"{FFFFFF}Cati BTC doresti sa cumperi? Vei plati {23E800}$%s{FFFFFF} pentru fiecare BTC. (Cantitate minima: 0.1BTC)",FormatNumber(btcprice));
        ShowPlayerDialog(playerid,DIALOG_BITCOINEXCHANGE4,DIALOG_STYLE_INPUT,"Cumparare BTC - Bitcoin Exchange",string,"Ok","Anuleaza");
    }
}
case DIALOG_BITCOINEXCHANGE4: {
    if(!response) return 1;
    new Float:amount = floatstr(inputtext),pret;
    if(amount < 0.1) return SCM(playerid,COLOR_LIGHTRED,"Trebuie sa cumperi minim 0.1 BTC!");
    pret = floatround(amount*btcprice);
    if(GetPlayerCash(playerid) < pret) return SCM(playerid,COLOR_LIGHTRED,"Nu ai suma necesara de bani!");
    GivePlayerCash(playerid,-pret);
    Update(playerid,pCashx);
    PlayerInfo[playerid][pBitcoin] += amount;
    mysql_format(SQL,query,sizeof(query),"UPDATE `users` SET `Bitcoin`=`Bitcoin`+'%.5f' WHERE `ID`='%d'",amount,PlayerInfo[playerid][pSQLID]);
    mysql_tquery(SQL,query,"","");
    format(string,sizeof(string),"Ai cumparat %.5f BTC la pretul de $%s.",amount,FormatNumber(pret));
    SCM(playerid,COLOR_GREEN,string);
    btcchange+=floatround(amount*10);
}

case DIALOG_BITCOINEXCHANGE3: {
    if(!response) return 1;
    new Float:amount = floatstr(inputtext),pret;
    if(amount < 0.1) return SCM(playerid,COLOR_LIGHTRED,"Trebuie sa vinzi minim 0.1 BTC!");
    pret = floatround(amount*btcprice);
    if(PlayerInfo[playerid][pBitcoin] < amount) return SCM(playerid,COLOR_LIGHTRED,"Nu ai suficienti Bitcoini!");
    GivePlayerCash(playerid,pret);
    Update(playerid,pCashx);
    PlayerInfo[playerid][pBitcoin] -= amount;
    mysql_format(SQL,query,sizeof(query),"UPDATE `users` SET `Bitcoin`=`Bitcoin`-'%.5f' WHERE `ID`='%d'",amount,PlayerInfo[playerid][pSQLID]);
    mysql_tquery(SQL,query,"","");
    format(string,sizeof(string),"Ai vandut %.5f BTC la pretul de $%s.",amount,FormatNumber(pret));
    SCM(playerid,COLOR_GREEN,string);
    btcchange-=floatround(amount*10);
}

case DIALOG_BITCOINMINING: {
    if(!response) return 1;
    new Float:amount = floatstr(inputtext),pret,queryx[128],szString[128];
    if(amount < 0.1) return SCM(playerid,COLOR_LIGHTRED,"Trebuie sa cumperi minim 0.1 MH/s!");
    pret = floatround(amount*100000);
    if(GetPlayerCash(playerid) < pret) return SCM(playerid,COLOR_LIGHTRED,"Nu ai suma necesara de bani!");
    GivePlayerCash(playerid,-pret);
    Update(playerid, pCashx);
    mysql_format(SQL,queryx,sizeof(queryx),"INSERT INTO `bitcoin_mining` (`playerid`, `amount`,`timelimit`) VALUES ('%d', '%.2f','%d')",PlayerInfo[playerid][pSQLID],amount,gettime()+7*24*3600);
    mysql_tquery(SQL,queryx,"","");
    format(szString,sizeof(szString),"Ai cumparat %.2f MH/s la pretul de $%s.",amount,FormatNumber(pret));
    SCM(playerid,COLOR_GREEN,szString);
}

 

Link to comment
Share on other sites

C:\Users\model\Desktop\T0T\bloody dark server\BloodYDark\gamemodes\nzone.pwn(7021) : error 014: invalid statement; not in switch
C:\Users\model\Desktop\T0T\bloody dark server\BloodYDark\gamemodes\nzone.pwn(7021) : warning 215: expression has no effect
C:\Users\model\Desktop\T0T\bloody dark server\BloodYDark\gamemodes\nzone.pwn(7021) : error 001: expected token: ";", but found ":"
C:\Users\model\Desktop\T0T\bloody dark server\BloodYDark\gamemodes\nzone.pwn(7021) : error 029: invalid expression, assumed zero
C:\Users\model\Desktop\T0T\bloody dark server\BloodYDark\gamemodes\nzone.pwn(7021) : fatal error 107: too many error messages on one line
 

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
Reply to this topic...

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