Script Reader
Übersicht

![]() |
juse4proBetreff: Script Reader |
![]() Antworten mit Zitat ![]() |
---|---|---|
hi,
ich versuche jetzt schon seit 3 Jahren hinter das Geheimnis zu kommen, wie man einen ScriptReader programmiert... ![]() kann mir wer von euch weiterhelfen? hier habe ich mal meinen ansatz: Code: [AUSKLAPPEN] Graphics 640, 480, 16, 2 SetBuffer BackBuffer() Dim string_line$(1) Function read_script_line(script_line$) Local current_line$ = script_line$ Local counter = 1 Local next_pos = 1 Print "Start mit: " + current_line$ Repeat result = Instr(current_line$, ",", next_pos) If result > 0 counter = counter + 1 next_pos = result + 1 Else Exit EndIf Print "weiter mit: " + Mid(current_line$,next_pos - 1,-1) Forever Print "Benötigte Dimensionen: " + (counter) Dim string_line$(counter) Print counter next_pos = 1 For z = 0 To counter If z = 0 result = Instr(current_line$, "-");, next_pos) ElseIf z = counter result = Instr(current_line$, ";");, next_pos) Else result = Instr(current_line$, ",");, next_pos) EndIf next_pos = result current_line$ = Right(current_line$,Len(current_line$)-) string_line$(z) = Left(current_line$,next_pos - 1) Print "string_line$(" + z + ") = " + string_line$(z) Print "next_pos = " + next_pos Next End Function read_script_line("text- 5,5,1 ;") WaitKey() End da hatte ich wohl ein brainstorming in eine bb datei geschrieben, es funktioniert nicht wirklich, an folgendem Teil: Code: [AUSKLAPPEN] For z = 0 To counter
If z = 0 result = Instr(current_line$, "-");, next_pos) ElseIf z = counter result = Instr(current_line$, ";");, next_pos) Else result = Instr(current_line$, ",");, next_pos) EndIf next_pos = result current_line$ = Right(current_line$,Len(current_line$)-) string_line$(z) = Left(current_line$,next_pos - 1) Print "string_line$(" + z + ") = " + string_line$(z) Print "next_pos = " + next_pos Next ich kriege nicht die einzelnen parameter, sondern nur müll aus meiner code zeile... kann mir einer erklären, wie ich das richtig machen könnte? wäre euch sehr verbunden, danke im vorraus^^ help *EDIT*: ich möchte sozusagen nur den strich hinter dem befehl, die kommas und das semikolon, wegschneiden und das was dazwischen stand in meinen array speichern... |
||
Portfolio |LinkedIn |XING |
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group