SA-MP Forums Archive
Enumeration... - 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: Enumeration... (/showthread.php?tid=248555)



Enumeration... - Ash. - 14.04.2011

Good Evening(?) all,
Lovingly, i'm having to rescript my entire server. But, it's been a while since i've need to touch on enums, and so what could possibly be wrong with this?

pawn Код:
enum MissionData {load[], Float:lx, Float:ly, Float:lz, lname[], Float:ux, Float:uy, Float:uz, ulname[], cost}
The Compiler throws this error:
Код:
Y:\TruckingWorld Server Project\pawno\include\tw.inc(17) : error 029: invalid expression, assumed zero
(Yes, i know the drive is odd, its on my network so i can synchronize the data to my network if i make changes from remote locations, for example at school)

Thanks,
Ash


Re: Enumeration... - Jeffry - 14.04.2011

pawn Код:
enum MissionData
{
    load[256], //Arrays must have a given size.
    Float:lx,
    Float:ly,
    Float:lz,
    lname[256], //same here
    Float:ux,
    Float:uy,
    Float:uz,
    ulname[256], //And here
    cost
}
Greetz,
Jeffry


Re: Enumeration... - Ash. - 14.04.2011

Of course, i'm more used to making functions (where there is no limit) haha.

Thanks Jeffry
Loving your signature, again


Re: Enumeration... - Jeffry - 14.04.2011

Quote:
Originally Posted by funky1234
Посмотреть сообщение
Thanks Jeffry
Loving your signature, again
No problem.
Glad you like it.