// defines
#define coords Float:_x, Float:_y, Float:_z
#define coords2 Float:_x2, Float:_y2, Float:_z2
new gTag_i; // somewhere in the code, used for array indexes.
// ...
// lot of code
// ...
switch(cache_get_field_int(i, "type"))
{
case OBJ_GANG_TAG:
{
objects[gTag][gTag_i][obj_id] = CreateDynamicObject( // 998 line
cache_get_field_int(i, "model"),
coords,
coords2
);
enum e_obj:(<<= 1)
{
fPickedUp = 1,
fIsActive
};
enum e_obj_other_ids
{
obj_gang_id,
obj_player_id,
obj_text_id
};
enum e_obj_details
{
obj_id,
e_obj:obj_flags,
obj_other_ids[e_obj_other_ids]
};
enum e_objects_list
{
gTag[13]
};
new objects[e_objects_list][e_obj_details];
C:\Users\Yiin\Desktop\story\gamemodes\story.pwn(998) : warning 213: tag mismatch C:\Users\Yiin\Desktop\story\gamemodes\story.pwn(998) : warning 215: expression has no effect C:\Users\Yiin\Desktop\story\gamemodes\story.pwn(998) : error 001: expected token: ";", but found "[" C:\Users\Yiin\Desktop\story\gamemodes\story.pwn(998) : error 029: invalid expression, assumed zero C:\Users\Yiin\Desktop\story\gamemodes\story.pwn(998) : warning 215: expression has no effect C:\Users\Yiin\Desktop\story\gamemodes\story.pwn(998) : error 001: expected token: ";", but found "]" C:\Users\Yiin\Desktop\story\gamemodes\story.pwn(998) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664Copyright © 1997-2006, ITB CompuPhase 4 Errors. [Finished in 10.2s with exit code 1]
enums aren't arrays and you can't use them as arrays like that. You aren't making a multi-dimensional array by using an enum for the first dimension.
|