gizmo1 Posted March 1, 2009 Author Share Posted March 1, 2009 here is the what i have in my ini file:**Key****Green** = Problem With SplittingInside INI File:003=3,3,"DoubleSlap","The foe is slapped repeatedly**,** back and forth**,** two to five times in a row.",29,15,0,85,10,0,0,0,115,0the green commas are considered outputs and i want them to be a part of the string, is there a way i can fix that?i want the move description to return as one outputhere is what i have so far:```Private Sub Command1_Click()Dim Stats() As StringDim Splitter As StringDim MoveName As StringDim Brief As StringDim Effect As StringDim Power As StringDim MType As StringDim Accuracy As StringDim PP As StringDim Effect_Accuracy As StringDim Who_Effects As StringDim Priority As StringDim Physical_Contact As StringDim Damage_Type As StringDim LooperDim Dud() As StringDim Newer As StringLooper = 0Do Until Looper = 10Looper = Looper + 1Splitter = GetVar("\Moves.ini", "Stats", "00" & Looper)Stats = Split(Splitter, ",", 14, vbTextCompare)'putvars hereMoveName = Stats(2)Brief = Stats(3)Effect = Stats(4)Power = Stats(5)MType = Stats(6)Accuracy = Stats(7)PP = Stats(8)Effect_Accuracy = Stats(9)Who_Effects = Stats(10)Priority = Stats(11)Physical_Contact = Stats(12)Damage_Type = Stats(13)Call MsgBox(Stats(2) & ":" & Stats(3) & ":" & Stats(4) & ":" & Stats(5) & ":" & Stats(6) & ":" & Stats(7) & ":" & Stats(8) & ":" & Stats(9) & ":" & Stats(10) & ":" & Stats(11) & ":" & Stats(12) & ":" & Stats(13))If Looper = 10 ThenExit DoExit SubEnd IfLoopEnd Sub``` Link to comment Share on other sites More sharing options...
gizmo1 Posted March 1, 2009 Author Share Posted March 1, 2009 bump, can someone please help me? Link to comment Share on other sites More sharing options...
xeross Posted March 1, 2009 Share Posted March 1, 2009 you mean that when you give the splitter the comma it doesn't read it as a string ? Link to comment Share on other sites More sharing options...
gizmo1 Posted March 1, 2009 Author Share Posted March 1, 2009 no i want it to exclude the the comma in the description and it includes it :(. Link to comment Share on other sites More sharing options...
xeross Posted March 1, 2009 Share Posted March 1, 2009 Ah after the split the comma is still there.http://www.xtremevbtalk.com/showthread.php?t=209386after the split comma's should be gone Link to comment Share on other sites More sharing options...
gizmo1 Posted March 1, 2009 Author Share Posted March 1, 2009 nope, thats not what i meant. here is my source of what i have so far: http://files.filefront.com/Archiverar/;13392384;/fileinfo.htmlif you click the message box it will split the commas in the description, i want it to skip the string. Link to comment Share on other sites More sharing options...
xeross Posted March 1, 2009 Share Posted March 1, 2009 Ah, i now understand you, just use another delimiter preferably multi-character maybe something like :|: Link to comment Share on other sites More sharing options...
gizmo1 Posted March 1, 2009 Author Share Posted March 1, 2009 can you show me an example? Link to comment Share on other sites More sharing options...
xeross Posted March 1, 2009 Share Posted March 1, 2009 Now your splitting on the```,```right ?Well just replace the splitters with for example```:|:```So```Stats = Split(Splitter, ",", 14, vbTextCompare)```Becomes```Stats = Split(Splitter, ":|:", 14, vbTextCompare)```and the ini entries become like this:```001=1:|:1:|:Pound:|:The foe is physically pounded with a long tail or a foreleg, etc.:|:0:|:40:|:0:|:100:|:35:|:0:|:0:|:0:|:115:|:0```You could use another delimiter thats more readable though dunno |:| [:] [;] w/e Link to comment Share on other sites More sharing options...
gizmo1 Posted March 1, 2009 Author Share Posted March 1, 2009 yeah, the problem is i will have to do that manually in the ini file for all 457 of the moves. Link to comment Share on other sites More sharing options...
xeross Posted March 1, 2009 Share Posted March 1, 2009 How did you get that ini file ? Link to comment Share on other sites More sharing options...
gizmo1 Posted March 1, 2009 Author Share Posted March 1, 2009 bump, here is what it turns out to be when i replaced all of commas with |:| :```003=3|:|3|:|%DoubleSlap%|:|%The foe is slapped repeatedly|:| back and forth|:| two to five times in a row.%|:|29|:|15|:|0|:|85|:|10|:|0|:|0|:|0|:|115|:|0```its moves.ini Link to comment Share on other sites More sharing options...
xeross Posted March 1, 2009 Share Posted March 1, 2009 Did you make the entire file manually ?Also if you replace all the , with that make sure you put back the comma's in the sentences Link to comment Share on other sites More sharing options...
gizmo1 Posted March 1, 2009 Author Share Posted March 1, 2009 no i did not make it manually found it on legendarypokemon.net. lol yeah thats what i was saying i would have to do that manually for everything :(. i wanted to find a logical strategic way of generating this cause i'm one of the lazier programmers. Link to comment Share on other sites More sharing options...
gizmo1 Posted March 1, 2009 Author Share Posted March 1, 2009 bump, i figured it out, i found a logical way of doing this, i made the |:| with an infinite space of 0 to a comma and clicked replace all and that seemed to work. Link to comment Share on other sites More sharing options...
xeross Posted March 5, 2009 Share Posted March 5, 2009 Ah yes good. Link to comment Share on other sites More sharing options...
gizmo1 Posted March 6, 2009 Author Share Posted March 6, 2009 its quite logical, a space comes after a comma in the english context. 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