09.05.2013, 19:13
Quote:
Would this be possible, to set 0 as the default already in the enum?
pawn Code:
pawn Code:
|
Float:FLocY = 0,
Float:FLocZ = 0,
means:
#define FLocX 0
#define FLocY 0
#define FLocZ 0
which makes:
TLocations[x][FLocX]
TLocations[x][FLocY]
TLocations[x][FLocZ]
look like:
TLocations[x][0]
TLocations[x][0]
TLocations[x][0]..
Accessing the same index for multiple values isn't a good idea?
Why don't you:
Float:FLoc[3],
So you can access it:
FLoc[0] for x
FLoc[1] for y
FLoc[2] for z
------
Other than all that, you haven't understood enums yet. It's never possible for "TruckLocation" to set a default value to your "TLocations".. simply, TruckLocation is only used for accessing indexes of TLocations.