Wierd enum warnings. - 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: Wierd enum warnings. (
/showthread.php?tid=628600)
Wierd enum warnings. -
danielpalade - 12.02.2017
-- DELETED --
Re: Wierd enum warnings. -
Nate4 - 12.02.2017
I've experienced the same warning before, and defining the enum with a different syntax seems to stop it:
PHP код:
enum _:E_VEHICLE_DATA
As opposed to the current syntax you've used. I don't understand what the issue/cause is, maybe someone else can explain it
Re: Wierd enum warnings. -
danielpalade - 12.02.2017
Quote:
Originally Posted by Nate4
I've experienced the same warning before, and defining the enum with a different syntax seems to stop it:
PHP код:
enum _:E_VEHICLE_DATA
As opposed to the current syntax you've used. I don't understand what the issue/cause is, maybe someone else can explain it 
|
But If I do that, I'm getting errors:
Код:
../linkmania/races.inc(81) : error 021: symbol already defined: "vRace"
../linkmania/races.inc(812) : error 032: array index out of bounds (variable "E_VEHICLE")
Even tho the variable vRace is only used in this enum, I'm still getting this error..
And this is the code for the second error.
Код:
stock UnloadRace()
{
memset(E_ACTIVE_RACE, 0, E_RACES_DATA);
foreach (new i : Vehicles)
{
new next;
if (E_VEHICLE[i][vRace] != 1)
continue;
created_vehicles --;
DestroyVehicle(E_VEHICLE[i][vVehicle]);
VehicleIndex[E_VEHICLE[i][vVehicle]] = -1;
ResetVehicleVariables(i);
Iter_SafeRemove(Vehicles, i, next);
i = next;
}
}
Re: Wierd enum warnings. -
Runn3R - 12.02.2017
I suggest you to re-read this topic:
https://sampforum.blast.hk/showthread.php?tid=318307
And why are you calling the arrays the same (almost the same) thing as enumators like what?? It's so confusing.