Its a love hate relationship with enums
#1

Hi all,
I am making a script for a simple gates system, that allows a one gate/one line system (which will be released on the SAMP forums later today)

I have pretty much finished it, i just get the following errors with my enum/array:
Heres my array/enum
pawn Код:
enum GateInfo {gateid, Float:closedx, Float:closedy, Float:closedz, Float:rotx, Float:roty, Float:rotz, Float:openx, Float:openy, Float:openz, command, gatemodel}
new Gates[MAX_GATES][GateInfo] = {
//Enter you're gates here:
{1, -760.57293701172, 730.67974853516, 17.14900970459, 0.0, 0.0, 328.23999023438, -767.73754882813, 735.09216308594, 17.14900970459, "/mygate", 969}

//No more gates past this comment
};
and heres my errors:
pawn Код:
C:\Users\Ashley Hardy\SA-MP Stuff!\Releases\Simple Gates by funky1234.pwn(25) : warning 228: length of initialler exceeds size of the enum field
C:\Users\Ashley Hardy\SA-MP Stuff!\Releases\Simple Gates by funky1234.pwn(25) : error 018: initialization data exceeds declared size
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
There are 12 sets of data in my array, and 12 enum names. I dont get why its doing this to me

Anyway, all users that help me on this will have their credits added to my script/release thread

Thanks
Ash
Reply
#2

Does anybody know whats wrong? Anyone ?
Reply
#3

command[50] since It holds a string
Reply
#4

Works! Brilliant mate

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)