Error Help REP ++ - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Error Help REP ++ (
/showthread.php?tid=475749)
Error Help REP ++ -
teomakedonija - 14.11.2013
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 ++ !
AW: Error Help REP ++ -
Skimmer - 14.11.2013
Where's the error line?
Re: Error Help REP ++ -
teomakedonija - 14.11.2013
On dini_Create(carid);
Re: Error Help REP ++ -
whando - 14.11.2013
Код:
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;
}
}
}
Re: Error Help REP ++ -
Mattakil - 14.11.2013
OnPropUpdate(0, idcar);
OnPlayerUpdate(playerid);
you're using callbacks as functions??
Re: Error Help REP ++ -
teomakedonija - 14.11.2013
Sure but i have problem with dini_Create
Re: Error Help REP ++ -
Mattakil - 15.11.2013
Quote:
Originally Posted by teomakedonija
Sure but i have problem with dini_Create
|
Did you actually try to compile after removing it?
Re: Error Help REP ++ -
teomakedonija - 15.11.2013
Yes and when i remove it it's working
Re: Error Help REP ++ -
Konstantinos - 15.11.2013
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.
Re: Error Help REP ++ -
teomakedonija - 15.11.2013
Can you make script like your Replay plz ?