Jump to content
  • 0

error 035: argument type mismatch (argument 2)


AndyAdv

Question

Erori: 
C:\Users\Andrei\Desktop\All Folders\Gamemode\Gamemode\gamemodes\gmm.pwn(31649) : error 035: argument type mismatch (argument 2)
C:\Users\Andrei\Desktop\All Folders\Gamemode\Gamemode\gamemodes\gmm.pwn(31650) : error 035: argument type mismatch (argument 2)

code:

ptask payday[1000](playerid) 
    {
    new hour,minn,sec;
    gettime(hour,minn,sec);
    if(PlayerInfo[playerid][pSleeping] == 0 && Spectate[playerid] == 255 && AFKSeconds[playerid] < 15)
    if(PlayerInfo[playerid][pPayDayIn] == 0) {
        new string[128];
        new interest,account[MAX_PLAYERS];

        new rent[MAX_PLAYERS];
        SetTimer("ScadeLicentele", 4000, false);
        new key = PlayerInfo[playerid][pHouse];
        if(key != 999)
        {
            rent[playerid] = HouseInfo[key][hRent];
            HouseInfo[key][hTakings] += rent[playerid];
        }
        new tmpintrate;
        SendClientMessage(playerid, -1, "{2b46e2}-------------------------------------------------------------------------------------------------------------{FFFFFF}");
        if(PlayerInfo[playerid][pPremiumAccount] == 1)
        {
            tmpintrate = 2;
            PlayerInfo[playerid][pPayDayHad] += 1;
            if(PlayerInfo[playerid][pPayDayHad] >= 5) {
                PlayerInfo[playerid][pExp]++;
                PlayerInfo[playerid][pPayDayHad] = 0;
            }
            new bonus = PlayerInfo[playerid][pPayCheck] / 2;
            PlayerInfo[playerid][pPayCheck] += bonus;
        }
        else
        {
            tmpintrate = 1;
        }
        account[playerid] = PlayerInfo[playerid][pAccount];
        Tax += TaxValue;
        
        //PlayerInfo[playerid][pAccount] -= TaxValue;
        new checks = PlayerInfo[playerid][pLevel]*2500+random(3000);
        if(PlayerInfo[playerid][pDailyLogin] == 0) checks = checks*2;          
        GivePlayerCash(playerid, checks);
        interest = (PlayerInfo[playerid][pAccount]/5000)*(tmpintrate);
        if(PlayerInfo[playerid][pDailyLogin] == 0) interest = interest*2;
        if(PlayerInfo[playerid][pDailyLogin] == 0) PlayerInfo[playerid][pExp] += 100;
        else PlayerInfo[playerid][pExp] += 200;
        UpdateProgress(playerid, 0);
        PlayerInfo[playerid][pAccount] += interest+1000;           
        SendClientMessage(playerid, -1, "Ai primit o ora jucata.");
        PlayerInfo[playerid][pConnectTime] += 1; 
            format(string, sizeof(string), "UPDATE `users` SET `DayHours`=`DayHours`+1 WHERE `ID`='%d'", PlayerInfo[playerid][pSQLID]);
            mysql_query(SQL, string);
            format(string, sizeof(string), "UPDATE `users` SET `HoursMonth`=`HoursMonth`+1 WHERE `ID`='%d'", PlayerInfo[playerid][pSQLID]);
            mysql_query(SQL, string);
        PlayerInfo[playerid][pSeconds] = 0; 
        
        if(PlayerInfo[playerid][pDailyLogin] == 0) {
            PlayerInfo[playerid][pDailyLogin] = 1;
            UpdateVar(playerid, "DailyLogin", 1);
            SCM(playerid, -1, "You got +100 experience points because it's your first payday from this day.");
        }   
        PlayerInfo[playerid][pPayDay] = 0;
        PlayerInfo[playerid][pPayCheck] = 0;
        PlayerInfo[playerid][pPayDayIn] = 3600;
        PlayerInfo[playerid][pSpinPoints] += 1;
        PlayerInfo[playerid][pPetPoints] += 15;
        PlayerInfo[playerid][pLSTPoints] += 5;
        format(string, sizeof(string), "Paycheck (without taxes): %s $  | Experience earned: 200.", FormatNumber(checks));
        SendClientMessage(playerid, -1, string);
        format(string, sizeof(string), "Visit bank if you want to withdraw your money.");
        SendClientMessage(playerid, -1, "{FFFFFF}Ai primit 1 Spin Point{FFFFFF}");
        SendClientMessage(playerid, -1, "{FFFFFF}Ai primit 15 Pet Points{FFFFFF}");
        SendClientMessage(playerid, -1, "{8A2BE2}LST Points:{FFFFFF}Ai primit 5 LST Points");
        SendClientMessage(playerid, -1, string);                                           
        SendClientMessage(playerid, -1, "{2b46e2}-------------------------------------------------------------------------------------------------------------{FFFFFF}");
        UpdateProgress(playerid, 0);
        Update(playerid, pSpinPointsx);
        Update(playerid, pLSTPointsx);
        if(hour == 21) {
            new gold = 1 + random(10);
            new money = 10000 + random(5000);
            for(new h = 0; h < MAX_CLANS; h++) {
                if(strlen(ClanInfo[h][clName]) != 0) {
                    if(GetClanTurfs(h) >= 10) {
                        if(PlayerInfo[playerid][pClan] == h && h != 0) {
                            PlayerInfo[playerid][pPremiumPoints] += gold;
                            Update(playerid, pPremiumPointsx);
                            GivePlayerCash(playerid, money);
                            format(string, sizeof(string), "You got %d diamants and $%s because your clan had more than 10 territories.", gold, FormatNumber(money));
                            SCM(playerid, COLOR_MONEY, string);
                        }                                     
                    }
                }
            }       
        }
        if(RestartPayday == 1) {
            SendClientMessageToAll(-1, "Server-ul a fost restartat! Va rugam sa reveniti.");
            GameModeExit();
        }   
    }
    else {
        new string[64];
        PlayerInfo[playerid][pPayDayIn] --;
        format(string, sizeof(string), "~y~Payday in %s minutes.", CalculeazaTimp2(PlayerInfo[playerid][pPayDayIn]));
   31649:     PlayerTextDrawSetString(playerid, PaydayTimer_PTD ,string); // linia problema
   31650:     PlayerTextDrawShow(playerid, PaydayTimer_PTD); // linia problema
    }    
    return 1;        
    }

 

Ma puteti ajuta? Daca v-am dat liniile gresite scuze, mie asa imi arata compilator-ul...

YCMD:copianuarevaloare(playerid, params[], help) {
    if(PlayerInfo[playerid][pCopiator] == 1) {
        PlayerInfo[playerid][pProstie] = 9999;
        SendClientMessage(playerid, COLOR_RED, "Felicitari! Ai primit +9999 prostie pentru ca esti un copiator infect");
    }
    return 1;
}

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

        PlayerTextDrawSetString(playerid,  PlayerText:PaydayTimer_PTD[playerid], string);
        PlayerTextDrawShow(playerid, PlayerText:PaydayTimer_PTD[playerid]);

Am rezolvat iar cel de sus e cod-ul rezolvat!

YCMD:copianuarevaloare(playerid, params[], help) {
    if(PlayerInfo[playerid][pCopiator] == 1) {
        PlayerInfo[playerid][pProstie] = 9999;
        SendClientMessage(playerid, COLOR_RED, "Felicitari! Ai primit +9999 prostie pentru ca esti un copiator infect");
    }
    return 1;
}

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.