Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 13:20

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Auslesefunktion funktioniert nicht!

Discussion on Auslesefunktion funktioniert nicht! within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
V8II's Avatar
 
elite*gold: 0
Join Date: Jul 2010
Posts: 475
Received Thanks: 130
Auslesefunktion funktioniert nicht!

Hi,
Kann mir jemand sagen was ich falsch gemacht habe?
PHP Code:
Func kmqWrite($Sektion$key$wert$file 1)
    If 
$file 1 Then
        $file 
= @DesktopDir "\MeineQuest.kmq"
    
EndIf
    
$Sektion StringToBinary($Sektion)
    
$wert _StringEncrypt(1$wert"KMCryptFunc"2)
    
$wert StringToBinary($wert)
    
$wert _StringReverse($wert)
    
$key StringToBinary($key)
    
$key _StringReverse($key)
    If 
FileRead($file) <> "" And FileRead($file) <> And Not @error Then
        $exFile 
FileRead($file)
        
$encString _StringEncrypt(0$exFileStringToBinary("V8IICryptforKM"))
        
FileDelete($file)
        
_FileCreate($file)
        
FileWrite($file$encString)
    Else
        
_FileCreate($file)
    EndIf
    
IniWrite($file$Sektion$key$wert)
    If 
FileRead($file) <> "" And FileRead($file) <> And Not @error Then
        $exFile 
FileRead($file)
        
$encString _StringEncrypt(1$exFileStringToBinary("V8IICryptforKM"))
        
FileDelete($file)
        
_FileCreate($file)
        
FileWrite($file$encString)
    EndIf
EndFunc   ;==>kmqWrite

Func kmqRead
($Sektion$key$file 1)
    If 
$file 1 Then
        $file2 
= @DesktopDir "\MeineQuest.kmq"
    
Else
        
$file2 $file
    
EndIf
    If 
FileRead($file2) <> "" And FileRead($file2) <> 0 Then
        $exFile 
FileRead($file2)
        
$encString _StringEncrypt(0$exFileStringToBinary("V8IICryptforKM"))
        
$kmqRead IniRead($file2BinaryToString($Sektion), BinaryToString(_StringReverse($key)), "")
    Else
        
MsgBox(16"Fehler"".kmq Datei konnte nicht gelesen werden!")
        Exit
    EndIf
    
$kmqRead _StringReverse(BinaryToString(_StringEncrypt(0$kmqRead"KMCryptFunc"2)))
    Return 
$kmqRead
EndFunc   
;==>kmqRead 
Danke!
Fehler: MsgBox(16, "Fehler", ".kmq Datei konnte nicht gelesen werden!") kommt immer =(

Lg V8II
V8II is offline  
Old 05/11/2011, 18:38   #2
 
BlackHybrid's Avatar
 
elite*gold: 52
The Black Market: 101/0/0
Join Date: Oct 2010
Posts: 1,998
Received Thanks: 389
Bin ich blind oder wird $file3 garnicht erst deklariert?
BlackHybrid is offline  
Thanks
1 User
Old 05/11/2011, 18:59   #3
 
V8II's Avatar
 
elite*gold: 0
Join Date: Jul 2010
Posts: 475
Received Thanks: 130
Du bist nicht blind ^^
Ich habe nur etwas geändert und dann vergessen, die Variablen umzubenennen ...
Allerdings funtzt es auch nicht, wenn ich sie umbenenne ...

PS: Startpost editiert

EDIT: Auflösung:
PHP Code:
If FileRead($file2) <> 0  Then 
ist totaler Schwachsinn, weil ich hierbei den Zahlenwert eines Strings ermittle, der automatisch 0 ergibt =)
V8II is offline  
Old 05/11/2011, 19:12   #4
 
BlackHybrid's Avatar
 
elite*gold: 52
The Black Market: 101/0/0
Join Date: Oct 2010
Posts: 1,998
Received Thanks: 389
PHP Code:
If FileRead($file2) <> "" And FileRead($file2) <> 0 Then 
Wieso denn <> 0? <> "" reicht doch. Dürfte zwar nicht der Fehler sein aber benötigt wirds doch auch nicht oder?
BlackHybrid is offline  
Reply


Similar Threads Similar Threads
hl.exe Funktioniert nicht
02/11/2011 - Counter-Strike - 4 Replies
Ehm ja. Vor kurzem hab ich Css grzockt dan kamm diese Meldung. Spiel hat sich geschloßen und wenn ich es starte kommt es immer wieder. Hätte ihr Tipps wie ich das weg mache? Hab Win7 + 64 bit
Warock funktioniert nicht! (Login nicht sichtbar)
07/23/2010 - WarRock - 5 Replies
Hallo zusammen, Seit dem Update startet Warrock nur noch bis zu Werbung(get Prem). Wenn ich diese wegklicke sieht man kein Login(Bildschirm schwarz). Ich habe Windows Vista Home, 32Bit und kein Antivir. Woran liegt das, hat jmd dasselbe Problem? --Danke--
Dorfplatzwächter anklicken geht nicht - Entbuggen nicht funktioniert.
03/23/2010 - Metin2 Private Server - 0 Replies
Huhu, bei mir hat das entbuggen des Dorfplatzwächtes nicht geklappt, ich hab diese Guildmanage_Quest oder wie sie heißt eingepackt, ich hab danach sogar ALLE Questen reingepackt. Ging alles nicht, brauche umbedingt Hilfe. Will nämlich den Clienten von NeonBlue benutzen, oder muss ich dazu noch ne Mob_Proto + Item_Proto (übersetzt) haben? bitte um Hilfe. MfG P.S. SuFu und Google haben beide nichts ausgespuckt. -.-"
Bei mir funktioniert das Löschcode nicht. Er hat mal funktioniert
01/07/2010 - Metin2 Private Server - 0 Replies
Hi. Also auf mienem PServer geht das mit dem Löschcode nicht. Kann mir jemand sagen warum? Ich weiß noch das es mal ging. Aber den Spieler in der Datenbank löschen geht nicht weil da diser lvl 0 charackter bleibt und ich nciht weiß wie man den weg kriegt Bitte kan mir jemand helfen.
Mhs funktioniert nicht mehr auch nicht mit metin programm!
10/05/2008 - Metin2 - 8 Replies
Metin programm funktioniert bei mir nicht seit gestern



All times are GMT +2. The time now is 13:20.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.