Jump to content

Recommended Posts

CMD:gdeposit(playerid, params[])
{
    if(!IsPlayerConnected(playerid)) return 1;
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
    new x = PlayerInfo[playerid][pMember],string[256],amount, item;
    if(sscanf(params, "s[30]d", item, amount)) return SendClientMessage(playerid, 0xFFFFFFFF, "{570303}Usage: {ffffff}/gdeposit <money/drugs/materials> <amount>");
    if(IsPlayerInRangeOfPoint(playerid,50.0,DynamicFactions[x][fcX],DynamicFactions[x][fcY],DynamicFactions[x][fcZ]))
    {
        if(strcmp(item,"money",true) == 0) // linia 22290
        {
            if(amount < 1 || amount > 30000000) return SCM(playerid,COLOR_WHITE,"{FFFFFF}Money limit is $1 - $30,000,000.");
            if(GetPlayerCash(playerid) >= amount)
            {
                new oldbalance = DynamicFactions[x][fBank];
                DynamicFactions[x][fBank] += amount;
                GivePlayerCash(playerid, -amount);
                Update(playerid,pCashx);
                new str[184];
                mysql_format(SQL,str,sizeof(str),"UPDATE `factions` SET `Bank`='%d' WHERE `ID`='%d'",DynamicFactions[x][fBank],x);
                mysql_tquery(SQL,str,"","");
                format(string,sizeof(string), "# %s deposited $%s into faction safe.(old balance: $%s / new balance: $%s)",GetName(playerid),FormatNumber(amount),FormatNumber(oldbalance),FormatNumber(DynamicFactions[x][fBank]));
                SendFamilyMessage(PlayerInfo[playerid][pMember],COLOR_LEADER,string);
                format(string,sizeof(string), "{ab1138}(Faction): {FFFFFF}You have deposit $%s into faction safe.", FormatNumber(amount));
                SCM(playerid, COLOR_WHITE, string);
                return 1;
            }
            else return SendClientMessage(playerid, COLOR_GREY, "Invalid amount.");
        }
        else if(strcmp(item,"materials",true) == 0) // linia 22310
        {
            if(amount <= PlayerInfo[playerid][pMats])
            {
                PlayerInfo[playerid][pMats] =PlayerInfo[playerid][pMats]-amount;
                DynamicFactions[x][fMats] +=amount;
                format(string,sizeof(string), "# %s deposited %d materials into faction safe.(balance %d materials)",GetName(playerid),amount,DynamicFactions[x][fMats]);
                SendFamilyMessage(x,COLOR_LEADER,string);
                format(string,sizeof(string), "{ab1138}(Faction): {FFFFFF}You have deposit %d materials into faction safe.", amount);
                SCM(playerid, COLOR_WHITE, string);
                new str[256];
                mysql_format(SQL,str,sizeof(str),"UPDATE `factions` SET `Mats`='%d' WHERE `ID`='%d'",DynamicFactions[x][fMats],x);
                mysql_tquery(SQL,str,"","");
                mysql_format(SQL,str,sizeof(str),"UPDATE users SET `Materials`='%d' WHERE `name`='%s'",PlayerInfo[playerid][pMats],PlayerInfo[playerid][pNormalName]);
                mysql_tquery(SQL,str,"","");
                return 1;
            }
            else return SendClientMessage(playerid, COLOR_GREY, "Invalid amount.");
        }
        else if(strcmp(item,"drugs",true) == 0) // linia 22329
        {
            if(amount <= PlayerInfo[playerid][pDrugs])
            {
                PlayerInfo[playerid][pDrugs] =PlayerInfo[playerid][pDrugs]-amount;
                DynamicFactions[x][fDrugs] +=amount;
                format(string,sizeof(string), "# %s put %d drugs into faction safe.(balance %d drugs)",GetName(playerid),amount,DynamicFactions[x][fDrugs]);
                SendFamilyMessage(PlayerInfo[playerid][pMember],COLOR_LEADER,string);
                format(string,sizeof(string), "{ab1138}(Faction): {FFFFFF}You have put %d drugs into faction safe.", amount);
                SCM(playerid, COLOR_WHITE, string);
                new str[184];
                mysql_format(SQL,str,sizeof(str),"UPDATE `factions` SET `Drugs`='%d' WHERE `ID`='%d'",DynamicFactions[x][fDrugs],x);
                mysql_tquery(SQL,str,"","");
                mysql_format(SQL,str,sizeof(str),"UPDATE users SET `Drugs`='%d' WHERE `name`='%s'",PlayerInfo[playerid][pDrugs],PlayerInfo[playerid][pNormalName]);
                mysql_tquery(SQL,str,"","");
                return 1;
            }
            else return SendClientMessage(playerid, COLOR_GREY, "Invalid amount.");
        }
        else return SendClientMessage(playerid, 0xFFFFFFFF, "{570303}Usage: {ffffff}/gdeposit <money/drugs/materials> <amount>");
    }
    return 1;
}

 

 

Erori:

C:\Users\Alex\Desktop\New folder (5)\gamemodes\BigZoneGM.pwn(22290) : error 035: argument type mismatch (argument 1)
C:\Users\Alex\Desktop\New folder (5)\gamemodes\BigZoneGM.pwn(22310) : error 035: argument type mismatch (argument 1)
C:\Users\Alex\Desktop\New folder (5)\gamemodes\BigZoneGM.pwn(22329) : error 035: argument type mismatch (argument 1)

Liniile cu erorile le gasiti, ex: // linia 22290

Share this post


Link to post
Share on other sites
3 hours ago, Alecksandru said:

CMD:gdeposit(playerid, params[])
{
    if(!IsPlayerConnected(playerid)) return 1;
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
    new x = PlayerInfo[playerid][pMember],string[256],amount, item;
    if(sscanf(params, "s[30]d", item, amount)) return SendClientMessage(playerid, 0xFFFFFFFF, "{570303}Usage: {ffffff}/gdeposit <money/drugs/materials> <amount>");
    if(IsPlayerInRangeOfPoint(playerid,50.0,DynamicFactions[x][fcX],DynamicFactions[x][fcY],DynamicFactions[x][fcZ]))
    {
        if(strcmp(item,"money",true) == 0) // linia 22290
        {
            if(amount < 1 || amount > 30000000) return SCM(playerid,COLOR_WHITE,"{FFFFFF}Money limit is $1 - $30,000,000.");
            if(GetPlayerCash(playerid) >= amount)
            {
                new oldbalance = DynamicFactions[x][fBank];
                DynamicFactions[x][fBank] += amount;
                GivePlayerCash(playerid, -amount);
                Update(playerid,pCashx);
                new str[184];
                mysql_format(SQL,str,sizeof(str),"UPDATE `factions` SET `Bank`='%d' WHERE `ID`='%d'",DynamicFactions[x][fBank],x);
                mysql_tquery(SQL,str,"","");
                format(string,sizeof(string), "# %s deposited $%s into faction safe.(old balance: $%s / new balance: $%s)",GetName(playerid),FormatNumber(amount),FormatNumber(oldbalance),FormatNumber(DynamicFactions[x][fBank]));
                SendFamilyMessage(PlayerInfo[playerid][pMember],COLOR_LEADER,string);
                format(string,sizeof(string), "{ab1138}(Faction): {FFFFFF}You have deposit $%s into faction safe.", FormatNumber(amount));
                SCM(playerid, COLOR_WHITE, string);
                return 1;
            }
            else return SendClientMessage(playerid, COLOR_GREY, "Invalid amount.");
        }
        else if(strcmp(item,"materials",true) == 0) // linia 22310
        {
            if(amount <= PlayerInfo[playerid][pMats])
            {
                PlayerInfo[playerid][pMats] =PlayerInfo[playerid][pMats]-amount;
                DynamicFactions[x][fMats] +=amount;
                format(string,sizeof(string), "# %s deposited %d materials into faction safe.(balance %d materials)",GetName(playerid),amount,DynamicFactions[x][fMats]);
                SendFamilyMessage(x,COLOR_LEADER,string);
                format(string,sizeof(string), "{ab1138}(Faction): {FFFFFF}You have deposit %d materials into faction safe.", amount);
                SCM(playerid, COLOR_WHITE, string);
                new str[256];
                mysql_format(SQL,str,sizeof(str),"UPDATE `factions` SET `Mats`='%d' WHERE `ID`='%d'",DynamicFactions[x][fMats],x);
                mysql_tquery(SQL,str,"","");
                mysql_format(SQL,str,sizeof(str),"UPDATE users SET `Materials`='%d' WHERE `name`='%s'",PlayerInfo[playerid][pMats],PlayerInfo[playerid][pNormalName]);
                mysql_tquery(SQL,str,"","");
                return 1;
            }
            else return SendClientMessage(playerid, COLOR_GREY, "Invalid amount.");
        }
        else if(strcmp(item,"drugs",true) == 0) // linia 22329
        {
            if(amount <= PlayerInfo[playerid][pDrugs])
            {
                PlayerInfo[playerid][pDrugs] =PlayerInfo[playerid][pDrugs]-amount;
                DynamicFactions[x][fDrugs] +=amount;
                format(string,sizeof(string), "# %s put %d drugs into faction safe.(balance %d drugs)",GetName(playerid),amount,DynamicFactions[x][fDrugs]);
                SendFamilyMessage(PlayerInfo[playerid][pMember],COLOR_LEADER,string);
                format(string,sizeof(string), "{ab1138}(Faction): {FFFFFF}You have put %d drugs into faction safe.", amount);
                SCM(playerid, COLOR_WHITE, string);
                new str[184];
                mysql_format(SQL,str,sizeof(str),"UPDATE `factions` SET `Drugs`='%d' WHERE `ID`='%d'",DynamicFactions[x][fDrugs],x);
                mysql_tquery(SQL,str,"","");
                mysql_format(SQL,str,sizeof(str),"UPDATE users SET `Drugs`='%d' WHERE `name`='%s'",PlayerInfo[playerid][pDrugs],PlayerInfo[playerid][pNormalName]);
                mysql_tquery(SQL,str,"","");
                return 1;
            }
            else return SendClientMessage(playerid, COLOR_GREY, "Invalid amount.");
        }
        else return SendClientMessage(playerid, 0xFFFFFFFF, "{570303}Usage: {ffffff}/gdeposit <money/drugs/materials> <amount>");
    }
    return 1;
}

 

 

Erori:

C:\Users\Alex\Desktop\New folder (5)\gamemodes\BigZoneGM.pwn(22290) : error 035: argument type mismatch (argument 1)
C:\Users\Alex\Desktop\New folder (5)\gamemodes\BigZoneGM.pwn(22310) : error 035: argument type mismatch (argument 1)
C:\Users\Alex\Desktop\New folder (5)\gamemodes\BigZoneGM.pwn(22329) : error 035: argument type mismatch (argument 1)

Liniile cu erorile le gasiti, ex: // linia 22290

Ai gresit la new, trebuie definit cate caractere trebuie sa aive item, gen

new item[20];

Share this post


Link to post
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.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

This site uses cookies. By continuing browsing, you agree to the use of this information. For more details, see Terms of Use and Privacy Policy.