crzyone9584 Posted March 22, 2011 Author Share Posted March 22, 2011 I'm building up my personal guild system and for some reason its not allowing to add things to it.Like I'm trying to do Player(index).Guilds(i).GuildName = but but its not accepting the (i) and the ide beeps after i add the .Here is my code so far.```Public Guilds(1 To MAX_GUILDS) As GuildRec ' Used for checking guilds exsist or not.Private Type GuildRec GuildName As String * NAME_LENGTH GuildID As Byte GuildMembers(1 To MAX_GUILD_MEMBERS) As String AmountofGuildMembers(1 To MAX_GUILD_MEMBERS) As StringEnd Type```in the playerrec i have```'Guild System Guild(1 To MAX_USERS_GUILDS) As GuildRec```Here are my constants```Public Const MAX_GUILDS As Byte = 50Public Const MAX_USERS_GUILDS As Byte = 2 ' Allows users to join X amount of Guilds.Public Const MAX_GUILD_MEMBERS = 15 ' Limit one guld from having all the members```What have i messed up even if i leave out the (i) and just add . it still beeps at me. This is in EO 2.0 Link to comment Share on other sites More sharing options...
zdearborn Posted March 22, 2011 Share Posted March 22, 2011 Why is AmountofGuildMembers an array, and a string at that?I believe after **GuildMembers(1 To MAX_GUILD_MEMBERS) As String**, a *** 255** is needed. Link to comment Share on other sites More sharing options...
The New World Posted March 22, 2011 Share Posted March 22, 2011 Add:```Guilds as (Data Type)```To the PlayerRec to use it with Player(Index) Link to comment Share on other sites More sharing options...
crzyone9584 Posted March 22, 2011 Author Share Posted March 22, 2011 Zulu that was my bad it shouldv'e been a byte…@Yukiyo - thats what this is```'Guild System Guild(1 To MAX_USERS_GUILDS) As GuildRec```Thats whats in my Player rec right now. and is still not working. Link to comment Share on other sites More sharing options...
The New World Posted March 22, 2011 Share Posted March 22, 2011 Then instead of Player(Index).Guilds, use what you declared. Player(Index).Guild Link to comment Share on other sites More sharing options...
peekay Posted March 22, 2011 Share Posted March 22, 2011 You have nothing to check all the guildsyou declared the constant MAX_GUILDSbut your not using it in ur recsGuild(1 to MAX_GUILDS) as etcim doing the same thing for my guild systemim using Player(index).Guilds(i).GuildNameso what you would have is loop through all the guilds to find a slot thats emptyFor i=1 to MAX_GUILDS If Player(index).Guilds(i).GuildName = vbnullstring then Player(index).Guilds(i).GuildName = $variableNameTheyEntered Elsebut i see that your making that each user can have 2 guilds??if so ull need to do 2 loops using say i2 or something to check if the 2 users guilds have a empty slot? Link to comment Share on other sites More sharing options...
crzyone9584 Posted March 22, 2011 Author Share Posted March 22, 2011 peekay, I know how it it works. The check is nt even programmed in yet. It was getting programmed when i came across this error. If you notice there is a for i loop and an for x loop…@Yukiyo - s in Player9index).Guilds was accidently typed when typing into the forums. I'm using .Guild but its just not working. I went and added my friend system in and thats not working either. None of the UDT's that I've added are working.... Link to comment Share on other sites More sharing options...
goku1993 Posted March 22, 2011 Share Posted March 22, 2011 wouldn't it be easier to just typeGuild(1 To MAX_USERS_GUILDS) As String?? i mean i'v never tried having 2 dots for one thing but well i guess it should work. Link to comment Share on other sites More sharing options...
crzyone9584 Posted March 22, 2011 Author Share Posted March 22, 2011 I've never tried but thats how i need it to be. And now it wouldn't be easier because then I'd have to create another udt just so it can be saved in a file… Link to comment Share on other sites More sharing options...
goku1993 Posted March 22, 2011 Share Posted March 22, 2011 all i did to find guildnumber for example is save in player guildnum for example then when i needed it for guild somthing like guild(guildnum).name Link to comment Share on other sites More sharing options...
crzyone9584 Posted March 22, 2011 Author Share Posted March 22, 2011 Well it seems none of my custom udt's are working. I may just give up on the transition over from WN to EO 2.0 for right now… Link to comment Share on other sites More sharing options...
zdearborn Posted March 23, 2011 Share Posted March 23, 2011 I'm just spitballing here but does the declaration of the type have anything to do with it?I see both privates and publics in the types:```Private Type BankRec Item(1 To MAX_BANK) As PlayerInvRecEnd TypePublic Type PlayerInvRec num As Long Value As LongEnd Type```Maybe if you change Private Type GuildRec to Public Type GuildRec?Sorry if I'm way off, just trying to help… Link to comment Share on other sites More sharing options...
evilbunnie Posted March 23, 2011 Share Posted March 23, 2011 @zulu:> I'm just spitballing here but does the declaration of the type have anything to do with it?> > I see both privates and publics in the types:> ```> Private Type BankRec > Item(1 To MAX_BANK) As PlayerInvRec> End Type> > Public Type PlayerInvRec> num As Long> Value As Long> End Type> > ```Maybe if you change Private Type GuildRec to Public Type GuildRec?> > Sorry if I'm way off, just trying to help…You obviously have no idea. Please, stop trying.Is GuildRec above PlayerRec? because it will not function if it's not.EDITFound the problemChange```Public Const MAX_GUILD_MEMBERS = 15 ' Limit one guld from having all the members```to```Public Const MAX_GUILD_MEMBERS as byte = 15 ' Limit one guld from having all the members``` Link to comment Share on other sites More sharing options...
crzyone9584 Posted March 24, 2011 Author Share Posted March 24, 2011 thats not the problem bunny. all my other custom udt's are working either and they are all copy and pasted from wn which work just fine. I even tried typing them all out by hand once again, and still nothing works…As i said in my earlier post I'm giving up from moving from WN to EO 2.0EDIT: So i tried one last time. I renamed all the udts and guess what. they worked.... Who new renaming things would work... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now