15.10.2016, 08:28
Since I have no idea what I did wrong. I'm not gonna bother attempting to explain the issue. Here's the code of everything that has to do with the issue at hand.
The Enum, and array:
Where it says I have an issue:
The warnings the compiler outputs:
I'm pretty sure the issue lies within the "[0]" and me only having 1 line in the array currently, but I could be very wrong.
EDIT: Never mind. I had a major brain fart. Basically. What I did, was used the variables from the enum, but never specified what array I wanted to pull information from.
The Enum, and array:
Код:
enum eTMInfo
{
mission_actor_name[128],
mission_task_one[128],
mission_task_two[128],
Float:mission_load_cp_x,
Float:mission_load_cp_y,
Float:mission_load_cp_z,
Float:mission_unload_cp_x,
Float:mission_unload_cp_y,
Float:mission_unload_cp_z,
mission_number,
};
new aTMInfo[][eTMInfo] =
{
{"Steve", "I need you to move some freight for me. You can find in that warehouse over there.", "Good, you got it loaded. Now head over to the 24/7 in Juniper Hill and unload it.", 1706.398559, 1040.169921, 10.820312, -2471.517822, 787.875549, 35.171875, 0}
};
Код:
if(IsTrailerAttachedToVehicle(plr_veh_id))
{
DestroyDynamicRaceCP(tmMissionCheckpoint[playerid]);
tmMissionCheckpoint[playerid] = CreateDynamicRaceCP(2, mission_unload_cp_x[0], mission_unload_cp_y[0], mission_unload_cp_z[0], 0.0, 0.0, 0.0, 10, -1, -1, playerid, 9000.0);
FreezePlayerFor5Seconds(playerid);
tmMissionStatus[playerid] = 2;
}
Код:
C:\Users\mace\Desktop\Code Related Folders\Untitled Trucking Server\gamemodes\MTruck.pwn(815) : error 028: invalid subscript (not an array or too many subscripts): "mission_unload_cp_x" C:\Users\mace\Desktop\Code Related Folders\Untitled Trucking Server\gamemodes\MTruck.pwn(815) : warning 215: expression has no effect C:\Users\mace\Desktop\Code Related Folders\Untitled Trucking Server\gamemodes\MTruck.pwn(815) : error 001: expected token: ";", but found "]" C:\Users\mace\Desktop\Code Related Folders\Untitled Trucking Server\gamemodes\MTruck.pwn(815) : error 029: invalid expression, assumed zero C:\Users\mace\Desktop\Code Related Folders\Untitled Trucking Server\gamemodes\MTruck.pwn(815) : fatal error 107: too many error messages on one line
EDIT: Never mind. I had a major brain fart. Basically. What I did, was used the variables from the enum, but never specified what array I wanted to pull information from.

