14.08.2016, 11:53
Hey,
I recently created an org system,that stores orginfo in an enum, and then writes the data to file using Yini.however atm i'm having issues figuring out how to store members efficiently, as i feel atm the way i'm doing it is wrong and limits functionality.
atm i'm storing all members in the org enum:
and then these are saving to file like:
I would however like to store the Members in an array within the enum like Members[25][30], however I've read its not possible to store an array of strings within an enum?I ideally need something similar to an array of strings, so I can later read all members into a members list. Any suggestions would be great.
I have already tried the Members[25][30] in the enum and was just met with errors.
Thanks for any advice i recieve.
Dan
I recently created an org system,that stores orginfo in an enum, and then writes the data to file using Yini.however atm i'm having issues figuring out how to store members efficiently, as i feel atm the way i'm doing it is wrong and limits functionality.
atm i'm storing all members in the org enum:
Код:
enum OrgInfo { oID, Name[40], Type, // 0 = Gangs, 1= Law , 2 = Mafias, 3 = Gangs 4= PB Color[25], oLeader[128], Skins[3], Members, Vehicles, MemLimit, VehLimit, Float:CP[3], Float:Interior[3], Wep[4], WepAmmo[4], oBalance, oWage, oRank1[30], oRank2[30], oRank3[30], oRank4[30], oRank5[30], oRank6[30], Member1[30], Member2[30], Member3[30], Member4[30], Member5[30], Member6[30], Member7[30], Member8[30], Member9[30], Member10[30], Member11[30], Member12[30], Member13[30], Member14[30], Member15[30], Member16[30], Member17[30], Member18[30], Member19[30], Member20[30], Member21[30], Member22[30], Member23[30], Member24[30], Member25[30], VehicleID[20], VehicleModel[20], Vehiclecolor1[20], Vehiclecolor2[20], Float:VehiclePosX[20], Float:VehiclePosY[20], Float:VehiclePosZ[20], Float:VehiclePosA[20], Vehicle1fuel[20] }
Код:
[Organization Data] OrgID = 1 Name = The Cobras Type = 1 Color = COLOR_BLUE Leader = Skin1 = 276 Skin2 = 163 Skin3 = 279 Members = 0 Vehicles = 0 MemberLimit = 5 VehicleLimit = 10 CPX = -2669.562988 CPY = 595.637268 CPZ = 14.453125 Wep 1 = 31 Wep 1 Ammo = 1000 Wep 2 = 25 Wep 2 Ammo = 20 Wep 3 = 18 Wep 3 Ammo = 1 Wep 4 = 1 Wep 4 Ammo = 1 OrgBalance = 10000 OrgWage = 100 Member1 = Member2 = Member3 = Member4 = . . etc
I have already tried the Members[25][30] in the enum and was just met with errors.
Thanks for any advice i recieve.
Dan