Is there a way to retrieve one line from a variable? Like if my variable was:
Stratus:
hp 200
mp 200
mv 10
I need to retrieve only hp.
Stratus:
hp 200
mp 200
mv 10
I need to retrieve only hp.
This forum is a read-only archive of the Gammon Software forum (2000–2026). No new posts can be made. Search the archive.
Posted by Stratus on Mon 15 Sep 2003 01:02 AM — 2 posts, 14,054 views.
Dim MyVariable
Dim MyVarLines
MyVariable = "Stratus:" & Chr(10) & _
"hp 200" & Chr(10) & "mp 200" & Chr(10) & _
"mv 10"
MyVarLines = Split(MyVariable, Chr(10), -1, 1)
For x = LBound(MyVarLines) to UBound(MyVarLines)
World.Note CStr(x) & ": " & MyVarLines(x)
Next