Error Help REP ++
#1

pawn Код:
error 035: argument type mismatch (argument 1)
That is my error

Script:

pawn Код:
if(dialogid == AvtoProdazba)
        {
            if(response)
            {
                if(IsAnOwnableCar(idcar))
                {
                    if(PlayerInfo[playerid][pLevel] < 2)
                    {
                        SendClientMessage(playerid, COLOR_GREY, "Potreben vie Level 2 za da Go kupite!");
                        RemovePlayerFromVehicle(playerid);
                        TogglePlayerControllable(playerid, 1);
                        return 1;
                    }
                    if(PlayerInfo[playerid][pPcarkey] == 999) { }
                    else if(PlayerInfo[playerid][pPcarkey2] == 999) { }
                    else { SendClientMessage(playerid, COLOR_GREY, "Vekje Poseduvate 2 Avtomobila"); RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid, 1); return 1; }
                    if(CarInfo[idcar][cOwned]==1)
                    {
                        SendClientMessage(playerid, COLOR_GREY, "Nekoj Vekje go kupil ovoj Avtomobil");
                        RemovePlayerFromVehicle(playerid);
                        return 1;
                    }
                    if(GetPlayerMoney(playerid) >= CarInfo[idcar][cValue])
                    {
                        if(PlayerInfo[playerid][pPcarkey] == 999) { PlayerInfo[playerid][pPcarkey] = idcar; }
                        else if(PlayerInfo[playerid][pPcarkey2] == 999) { PlayerInfo[playerid][pPcarkey2] = idcar; }
                        else { return 1; }
                        CarInfo[idcar][cOwned] = 1;
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        strmid(CarInfo[idcar][cOwner], sendername, 0, strlen(sendername), 999);
                        GivePlayerMoney(playerid,-CarInfo[idcar][cValue]);
                        PlayerPlayMusic(playerid);
                        GameTextForPlayer(playerid, "~w~Cestito Go kupivte Avtomobilot!", 5000, 3);
                        SendClientMessage(playerid, COLOR_GRAD2, "Sega Mozete Da go Vozite,za KOmandi koristete /avtomobil!");
                        TogglePlayerControllable(playerid, 1);
                        dini_Create(idcar);
                        OnPropUpdate(0, idcar);
                        OnPlayerUpdate(playerid);
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_GREY, "Nemate Dovolno Pari za da go kupite ovoj avtomobil! ");
                        RemovePlayerFromVehicle(playerid);
                        TogglePlayerControllable(playerid, 1);
                        return 1;
                    }
                }
            }
REP ++ !
Reply
#2

Where's the error line?
Reply
#3

On dini_Create(carid);
Reply
#4

Код:
if(dialogid == AvtoProdazba)
        {
            if(response)
            {
                if(IsAnOwnableCar(idcar))
                {
                    if(PlayerInfo[playerid][pLevel] < 2)
                    {
                        SendClientMessage(playerid, COLOR_GREY, "Potreben vie Level 2 za da Go kupite!");
                        RemovePlayerFromVehicle(playerid);
                        TogglePlayerControllable(playerid, 1);
                        return 1;
                    }
                    if(PlayerInfo[playerid][pPcarkey] == 999) { }
                    else if(PlayerInfo[playerid][pPcarkey2] == 999) { }
                    else { SendClientMessage(playerid, COLOR_GREY, "Vekje Poseduvate 2 Avtomobila"); RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid, 1); return 1; }
                    if(CarInfo[idcar][cOwned]==1)
                    {
                        SendClientMessage(playerid, COLOR_GREY, "Nekoj Vekje go kupil ovoj Avtomobil");
                        RemovePlayerFromVehicle(playerid);
                        return 1;
                    }
                    if(GetPlayerMoney(playerid) >= CarInfo[idcar][cValue])
                    {
                        if(PlayerInfo[playerid][pPcarkey] == 999) { PlayerInfo[playerid][pPcarkey] = idcar; }
                        else if(PlayerInfo[playerid][pPcarkey2] == 999) { PlayerInfo[playerid][pPcarkey2] = idcar; }
                        else { return 1; }
                        CarInfo[idcar][cOwned] = 1;
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        strmid(CarInfo[idcar][cOwner], sendername, 0, strlen(sendername), 999);
                        GivePlayerMoney(playerid,-CarInfo[idcar][cValue]);
                        PlayerPlayMusic(playerid);
                        GameTextForPlayer(playerid, "~w~Cestito Go kupivte Avtomobilot!", 5000, 3);
                        SendClientMessage(playerid, COLOR_GRAD2, "Sega Mozete Da go Vozite,za KOmandi koristete /avtomobil!");
                        TogglePlayerControllable(playerid, 1);
                        dini_Create(idcar);
                        OnPropUpdate(idcar);
                        OnPlayerUpdate(playerid);
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_GREY, "Nemate Dovolno Pari za da go kupite ovoj avtomobil! ");
                        RemovePlayerFromVehicle(playerid);
                        TogglePlayerControllable(playerid, 1);
                        return 1;
                    }
                }
            }
Reply
#5

OnPropUpdate(0, idcar);
OnPlayerUpdate(playerid);

you're using callbacks as functions??
Reply
#6

Sure but i have problem with dini_Create
Reply
#7

Quote:
Originally Posted by teomakedonija
Посмотреть сообщение
Sure but i have problem with dini_Create
Did you actually try to compile after removing it?
Reply
#8

Yes and when i remove it it's working
Reply
#9

dini_Create uses as first parameter an array (string) and you used idcar which is an integer.

You'll need to format a string and pass the idcar as an argument so you can create that file.
Reply
#10

Can you make script like your Replay plz ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)