Dropcar Help - 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: Dropcar Help (
/showthread.php?tid=537731)
Dropcar Help -
weedxd - 17.09.2014
So basicly i have a problem with the following errors.
PHP код:
(11133) : error 033: array must be indexed (variable "reward")
(11137) : error 035: argument type mismatch (argument 2)
(23596) : error 021: symbol already defined: "Streamer_OnPlayerEnterCP"
PHP код:
CMD:dropcar(playerid)
{
if(GetPlayerVehicleID(playerid) != 0)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 2505.8506, -2629.0144, 13.2944, 5);
SendClientMessage(playerid, 0x00CCCCAA, "Drop the car at the crane!");
dropping[playerid] = true;
}
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(dropping[playerid] == true)
{
DisablePlayerCheckpoint(playerid);
new str[128];
11133 reward = 100;
format(str,sizeof(str), "You've earned $%d from dropping a car!", reward);
SendClientMessage(playerid, 0xFF0000AA, str);
11137 GivePlayerMoney(playerid, reward);
dropping[playerid] = false;
SetTimerEx("DropTimer", 20000, false, "i", playerid);
}
return 1;
}
First and 2nd errors are defined like this but i think it might be wrong.
PHP код:
//Dropcar
new reward[MAX_PLAYERS];
new Dropped[MAX_PLAYERS];
new DropTime[MAX_PLAYERS];
And the(23596) code is the same as the the dropcar code how could be bouth defining ?
PHP код:
public OnPlayerEnterCheckpoint(playerid)
Please guys i need help with this tried to fix this for past hour
Re: Dropcar Help -
weedxd - 17.09.2014
Mybe i should change:
PHP код:
public OnPlayerEnterCheckpoint(playerid)
To
PHP код:
If OnPlayerEnterCheckpoint(playerid)
In the dropcar cmd code?
Re: Dropcar Help -
Rudy_ - 17.09.2014
yes try it, btw it's
https://sampwiki.blast.hk/wiki/IsPlayerInCheckpoint
Re: Dropcar Help -
weedxd - 17.09.2014
Aight thanks mate but it doesent fix the first 2 errors which are the base reason why this ain't working ;/
Now more problems show up ;/
Код HTML:
C:\Users\WeeD\Desktop\HTLS-RP\gamemodes\HTLS-RP.pwn(11127) : error 010: invalid function or declaration
C:\Users\WeeD\Desktop\HTLS-RP\gamemodes\HTLS-RP.pwn(11129) : error 010: invalid function or declaration
C:\Users\WeeD\Desktop\HTLS-RP\gamemodes\HTLS-RP.pwn(11133) : error 010: invalid function or declaration
C:\Users\WeeD\Desktop\HTLS-RP\gamemodes\HTLS-RP.pwn(11135) : error 021: symbol already defined: "format"
C:\Users\WeeD\Desktop\HTLS-RP\gamemodes\HTLS-RP.pwn(11141) : error 010: invalid function or declaration
C:\Users\WeeD\Desktop\HTLS-RP\gamemodes\HTLS-RP.pwn(35955) : warning 203: symbol is never used: "reward"
C:\Users\WeeD\Desktop\HTLS-RP\gamemodes\HTLS-RP.pwn(35955) : warning 203: symbol is never used: "str"