View Single Post
LeeStrong
AlliedModders Donor
Join Date: Nov 2015
Old 12-22-2019 , 06:35   Re: Enum Structs Available This Holiday Season
Reply With Quote #34

Is anyone able to help with the above, like many others I'm running a fork of ckSurf which if using the latest SM compiler, will not compile due to the use of enums.

I'm not the most knowledgeable when it comes to the transitional syntax and I've been having trouble getting things to compile and function when making my own efforts to convert my fork of the timer.
Notepad++ isn't the most forthcoming either!

Sample of Code
Code:
enum MapZone
{
	zoneId,  				// ID within the map
	zoneType,  				// Types: Start(1), End(2), Stage(3), Checkpoint(4), Speed(5), TeleToStart(6), Validator(7), Checker(8), Stop(0)
	zoneTypeId, 			// ID of the same type eg. Start-1, Start-2, Start-3...
	Float:PointA[3],
	Float:PointB[3],
	Float:CenterPoint[3],
	String:zoneName[128],
	zoneGroup,
	Vis,
	Team,
	Float:TeleportPosition[3],
	Float:TeleportAngles[3]
}
Usage:
Code:
int g_mapZones[MAXZONES][MapZone];								// Map Zone array
			if (g_mapZones[i][zoneType] == 3 && g_mapZones[i][zoneGroup] == zonegroup)
			{
				StageIds[amount] = i;
				amount++;
			}
The above is just some example usage, but there's a lot of work to be done with this timer to make it happy with the up to date syntax. Are there any relatively simple ways to convert the above without having to make too many modifications to how they are used within the code?

Many thanks in advance for anyones input on the above.

Last edited by LeeStrong; 12-22-2019 at 06:36.
LeeStrong is offline