Hallo blackdeath911,
du hast einmal ein endif vergessen, ausserdem ist eine Variable nicht definiert gewesen, so sieht das Skript dann aus:
Spoiler anzeigen
#Region Includes
#include <Array.au3>
#include <File.au3>
#include <Inet.au3>
#include <String.au3>
#EndRegion Includes
#Region globale variabeln
Global $i = 0
Global $s = 0
Global $a = 0
Global $sum1 = 0
Global $sum2 = 0
Global $12std = 0
Global $12hwert = 0
Global $Wert_alt = 0
Global $Wert_alt2 = 0 ;<============== hat gefehlt
Global $anzahl = IniRead("data.ini", "accounts", "account", "fail")
;Daten aus ini auslesen und in die variabeln einsetzen
Dim $login[$anzahl]
Dim $pass[$anzahl]
Dim $account[$anzahl]
Global $pauseini = IniRead("data.ini", "pause", "pause", "30")
#EndRegion globale variabeln
While 1
If $a = $anzahl Then
ExitLoop
EndIf
$login[$a] = IniRead("data.ini", "login", "account" & $a, "fail")
$pass[$a] = IniRead("data.ini", "pass", "account" & $a, "fail")
$account[$a] = IniRead("data.ini", "art", "account" & $a, "fail")
$a = $a + 1
WEnd
$a = 0
While True
;txt dateien öffenen, wenn nicht geöffnet werden können Fehlerbox + exit
$punkte = FileOpen("punktefree.txt", 1)
$punkte2 = FileOpen("punkteprem.txt", 1)
If $punkte = -1 Then
MsgBox(0, "Fehler", "Die Datei konnte nicht geöffnet werden.")
Exit
EndIf
If $punkte2 = -1 Then
MsgBox(0, "Fehler", "Die Datei konnte nicht geöffnet werden.")
Exit
EndIf
While 1
;Daten aus der API holen -> Link mit variabeln aus der INI
$quelltext = _INetGetSource("http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=getaccountdetails_v1&login=" & $login[$s] & "&password=" & $pass[$s] & "&type=" & $account[$s])
$s = $s + 1
$a = $a + 1
;array wird erstellt für die fpoints und ppoints
$array = _StringBetween($quelltext, "fpoints=", "ppoints")
$array2 = _StringBetween($quelltext, "ppoints=", "curfiles")
; Free Points Berechnung:
$Wert = Int($array[0])
ConsoleWrite("FreePoints: " & $Wert & @CRLF)
If IsArray($array) Then
If $i > 0 Then
If $a = $anzahl Then
ConsoleWrite("1: " & $Wert - $Wert_alt & @CRLF)
FileWrite($punkte, $sum1 - $Wert_alt & " Time: " & @HOUR & ":" & @MIN & @CRLF)
EndIf
EndIf
$sum1 = $Wert + $sum1
If $a = $anzahl Then
$Wert_alt = $sum1
EndIf
; Premium Points Berechnung:
$Wert2 = Int($array2[0])
ConsoleWrite("PremiumPoints:" & @TAB & $Wert2 & @CRLF)
If IsArray($array2) Then
If $a = $anzahl Then
ConsoleWrite("1: " & $sum2 - $Wert_alt2 & @CRLF)
FileWrite($punkte2, $sum2 - $Wert_alt2 & @TAB & "Time:" & @TAB & @HOUR & ":" & @MIN & @CRLF)
EndIf
EndIf
$sum2 = $Wert + $sum2
If $a = $anzahl Then
$Wert_alt2 = $sum2
EndIf
If $a = $anzahl Then
ExitLoop
EndIf
EndIf ;<============== hat gefehlt
WEnd
;geöffnete txt´s wieder schließen das man die Punkteaufschreibung auch einsehen kann
FileClose($punkte)
FileClose($punkte2)
$pause1 = $pauseini * 60 * 1000
#Region Wartezeit
$begin = TimerInit()
Sleep($pause1)
$dif = TimerDiff($begin)
#EndRegion Wartezeit
$i = $i + 1
WEnd
es steigt bei mir allerdings wegen der fehlenden INI aus,
mfg (Auto)Bert