Eevee204 Posted September 15, 2012 Author Share Posted September 15, 2012 Okay so in my design I didn't want classes so I made Male/Female the classes, but I didn't want to make two different items (1 item per class) to work on male/female, so I created two folders in paperdolls 'male' and 'female'Now my problem is that it won't read both depending on the class type.The code I'm using to read different folder directory is this;```If Player(MyIndex).Class = "Male" Then gender = "male\" Else gender = "female\" End If ReDim Tex_Paperdoll(1) While FileExist(GFX_PATH & "paperdolls\" & gender & i & GFX_EXT) ReDim Preserve Tex_Paperdoll(NumPaperdolls) NumTextures = NumTextures + 1 ReDim Preserve gTexture(NumTextures) Tex_Paperdoll(NumPaperdolls).filepath = App.Path & GFX_PATH & "paperdolls\" & gender & i & GFX_EXT Tex_Paperdoll(NumPaperdolls).Texture = NumTextures NumPaperdolls = NumPaperdolls + 1 i = i + 1 Wend```I don't really know any other method to take from here, any one able to guide me?Thanks- Sythnet Link to comment Share on other sites More sharing options...
blkcrow Posted September 16, 2012 Share Posted September 16, 2012 check if this code works```if Player(MyIndex).Class = "Male" then gender = "male\"Else gender = "female\"End IfNumTextures = 0NumPaperdolls = 0i = 1While FileExist(App.Path & GFX_PATH & "paperdolls\" & gender & i & GFX_EXT) NumTextures = NumTextures + 1 NumPaperdolls = NumPaperdolls + 1 ReDim Preserve Tex_Paperdoll(NumPaperdolls) ReDim Preserve gTexture(NumTextures) Tex_Paperdoll(NumPaperdolls).filepath = App.Path & GFX_PATH & "paperdolls\" & gender & i & GFX_EXT Tex_Paperdoll(NumPaperdolls).Texture = NumTextures i = i + 1Wend```If it gives you a type missmatch error in this line```If Player(MyIndex).Class = "Male" Then```its because i thing .Class is a byte and not a string. I am not sure though and i cant look into the code right now Link to comment Share on other sites More sharing options...
Eevee204 Posted September 17, 2012 Author Share Posted September 17, 2012 Trying to do it a different method now, still getting no where… Link to comment Share on other sites More sharing options...
Eevee204 Posted September 18, 2012 Author Share Posted September 18, 2012 Bump Link to comment Share on other sites More sharing options...
blkcrow Posted September 19, 2012 Share Posted September 19, 2012 we cant help you if you dont give us enough information. Are you using EO 3 or EA? Where are you putting this code? Does it gives you any errors? Have you even tried the code i gave you? If yes what errors did it gave you? And whats the different method you are trying? Link to comment Share on other sites More sharing options...
Eevee204 Posted September 19, 2012 Author Share Posted September 19, 2012 Eclipse Advanced, modDatabase, Sub CheckPaperdolls, you didn't give me any code to try, it was the the same as mine and I've tried using a global variable to store male/female (0 and 1) Link to comment Share on other sites More sharing options...
blkcrow Posted September 19, 2012 Share Posted September 19, 2012 looking at the sub i can see that this code runs once and only loads the folder witch is the same as the players class. try this code instead```Public Sub CheckPaperdolls()Dim i As Long ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler i = 1 NumPaperdolls = 1 ReDim Tex_Paperdoll(1) While FileExist(GFX_PATH & "paperdolls\" & "male\" & i & GFX_EXT) ReDim Preserve Tex_Paperdoll(NumPaperdolls) NumTextures = NumTextures + 1 ReDim Preserve gTexture(NumTextures) Tex_Paperdoll(NumPaperdolls).filepath = App.Path & GFX_PATH & "paperdolls\" & "male\" & i & GFX_EXT Tex_Paperdoll(NumPaperdolls).Texture = NumTextures NumPaperdolls = NumPaperdolls + 1 i = i + 1 Wend While FileExist(GFX_PATH & "paperdolls\" & "female\" & i & GFX_EXT) ReDim Preserve Tex_Paperdoll(NumPaperdolls) NumTextures = NumTextures + 1 ReDim Preserve gTexture(NumTextures) Tex_Paperdoll(NumPaperdolls).filepath = App.Path & GFX_PATH & "paperdolls\" & "female\" & i & GFX_EXT Tex_Paperdoll(NumPaperdolls).Texture = NumTextures NumPaperdolls = NumPaperdolls + 1 i = i + 1 Wend NumPaperdolls = NumPaperdolls - 1 ' Error handler Exit Suberrorhandler: HandleError "CheckPaperdolls", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub``` Link to comment Share on other sites More sharing options...
Eevee204 Posted September 19, 2012 Author Share Posted September 19, 2012 No, see what I'm trying to do is make it tell the differences, if class == male then run this folder root instead, else run this folder root and if you're male it will run male folder etc. Link to comment Share on other sites More sharing options...
damian666 Posted September 19, 2012 Share Posted September 19, 2012 ```Player(MyIndex).Class```is defined as a Long value, not a string.so comparing it with "male" is never gonna work, it should be```Class(Player(MyIndex).Class).name```dami Link to comment Share on other sites More sharing options...
Slasheree Posted September 19, 2012 Share Posted September 19, 2012 I found in a brazilian forum something about this, Gender-based paperdoll. I think it was Aldeiarpgbr[EDIT] Found it: [http://www.aldeiarpgbr.com/t5233-csde-paperdoll-e-peperdoll-baseado-no-genero](http://www.aldeiarpgbr.com/t5233-csde-paperdoll-e-peperdoll-baseado-no-genero) Link to comment Share on other sites More sharing options...
Eevee204 Posted September 19, 2012 Author Share Posted September 19, 2012 Mhmm looks interesting, using Eclipse Advanced but hopefully should be able to work it in, thanks 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