Its a love hate relationship with enums - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Its a love hate relationship with enums (
/showthread.php?tid=164638)
Its a love hate relationship with enums -
Ash. - 01.08.2010
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
Re: Its a love hate relationship with enums -
Ash. - 01.08.2010
Does anybody know whats wrong? Anyone ?
Re: Its a love hate relationship with enums -
dice7 - 01.08.2010
command[50] since It holds a string
Re: Its a love hate relationship with enums -
Ash. - 01.08.2010
Works! Brilliant mate
Thanks