Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Need Help With Splitting First Time


gizmo1
 Share

Recommended Posts

here is the what i have in my ini file:
**Key**
**Green** = Problem With Splitting

Inside 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,0

the 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 output
here is what i have so far:
```
Private Sub Command1_Click()
Dim Stats() As String
Dim Splitter As String
Dim MoveName As String
Dim Brief As String
Dim Effect As String
Dim Power As String
Dim MType As String
Dim Accuracy As String
Dim PP As String
Dim Effect_Accuracy As String
Dim Who_Effects As String
Dim Priority As String
Dim Physical_Contact As String
Dim Damage_Type As String
Dim Looper
Dim Dud() As String
Dim Newer As String
Looper = 0
Do Until Looper = 10
Looper = Looper + 1
Splitter = GetVar("\Moves.ini", "Stats", "00" & Looper)
Stats = Split(Splitter, ",", 14, vbTextCompare)
'putvars here
MoveName = 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 Then
Exit Do
Exit Sub
End If
Loop
End Sub

```
Link to comment
Share on other sites

nope, thats not what i meant. here is my source of what i have so far: http://files.filefront.com/Archiverar/;13392384;/fileinfo.html

if 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

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...