Inserting code from a string.

Blitz3D Forums/Blitz3D Beginners Area/Inserting code from a string.

Dang..My Bad...
To make it up 2 ya here's this piece of code:
; Set these 2 variables for the Split Function
Dim Word$(1)
Global Max_Word=0

; Our Split Function....
Function Split(String2Parse$,Delimiter$)
	Count=Len(String2Parse$)+1
	Dim word$(Count)
	Max_Word=0 : Start=1
	For t=1To Count
		If Mid(String2Parse$,t,1)=Delimiter$ Or Mid(String2Parse$,t,1)=""
			Max_Word=Max_Word+1
			Word$(Max_Word)=Mid(String2Parse$,Start,t-Start)
			Start=t+1
		EndIf
	Next
End Function
Example Where String$ = "5|6|7"
Split(String$,"|")
For P.Player = Each Player
	P\X = Word$(1)
	P\Y = Word$(2)
	P\Z = Word$(3)
Next


BTW : ColorCoded with my new code formatting tool :)