Dropcar Help
#1

So basicly i have a problem with the following errors.
PHP код:
(11133) : error 033: array must be indexed (variable "reward")
(
11137) : error 035argument type mismatch (argument 2)
(
23596) : error 021symbol already defined"Streamer_OnPlayerEnterCP" 
PHP код:
CMD:dropcar(playerid)
{
    if(
GetPlayerVehicleID(playerid) != 0)
    {
        
DisablePlayerCheckpoint(playerid);
        
SetPlayerCheckpoint(playerid2505.8506, -2629.014413.29445); 
        
SendClientMessage(playerid0x00CCCCAA"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(playerid0xFF0000AAstr);
11137        GivePlayerMoney(playeridreward);
        
dropping[playerid] = false;
        
SetTimerEx("DropTimer"20000false"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
Reply
#2

Mybe i should change:
PHP код:
public OnPlayerEnterCheckpoint(playerid
To
PHP код:
If OnPlayerEnterCheckpoint(playerid
In the dropcar cmd code?
Reply
#3

yes try it, btw it's
https://sampwiki.blast.hk/wiki/IsPlayerInCheckpoint
Reply
#4

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"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)