Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 06:11

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

Advertisement



[Quickdraw] Crash fix

Discussion on [Quickdraw] Crash fix within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
FacePalmMan's Avatar
 
elite*gold: 0
Join Date: Jan 2013
Posts: 426
Received Thanks: 129
[Quickdraw] Crash fix

(Nur für Leute die das Problem selber haben / hatten und bis jetzt keine Lösung gefunden haben)

Heute habe ich versucht ein Spiel mit QuickDraw zu erstellen, was aber nicht ganz geklappt hat, da es ständig abgestürzt ist. Nach viertelstündigem Rumprobieren bin ich zum Schluss gekommen, dass es an _QuickDraw_Line liegt, was das Script crashen lässt wenn die Distanz kleiner ist als 3 pixel .

Also was kann man dagegen tun? Richtig. Selber Hand anlegen.
Kurz und knapp: Folgende zeile bei der _QuickDraw_Line funktion einfügen:
Code:
If Sqrt(($x2 - $x1) ^ 2 + ($y2 - $y1) ^ 2) < 3 Then Return False
Vorher (das crashverursachende):
Code:
Func _QuickDraw_Line( $x1, $y1, $x2, $y2, $Color )
	Local $Result = DllCall( $QuickDrawDLL, "bool:cdecl","RenderLine", "int", $x1, "int", $y1, "int", $x2, "int", $y2, "long", $Color )
	If @error Then Return SetError(@error, @extended, 0)
	Return True
EndFunc

Nachher (das crashsichere):
Code:
Func _QuickDraw_Line( $x1, $y1, $x2, $y2, $Color )
	If Sqrt(($x2 - $x1) ^ 2 + ($y2 - $y1) ^ 2) < 3 Then Return False
	Local $Result = DllCall( $QuickDrawDLL, "bool:cdecl","RenderLine", "int", $x1, "int", $y1, "int", $x2, "int", $y2, "long", $Color )
	If @error Then Return SetError(@error, @extended, 0)
	Return True
EndFunc
FacePalmMan is offline  
Reply


Similar Threads Similar Threads
Crash Frei 100%***~~~CyberRazzer NoMenu Chams/NoFog/FullBright!!!!!~~~***Crash Fre
11/30/2010 - WarRock Hacks, Bots, Cheats & Exploits - 66 Replies
Download: Removed! DT! Waiting for new Version!
QuickDraw Minigame
08/10/2010 - Metin2 Hacks, Bots, Cheats, Exploits & Macros - 7 Replies
Ich hab mal ein Minigame für euch, dass ihr spielen könnt, solang Metin2 Wartungsarbeiten hat ;) Howto: Sobald ihr das Game startet einfach auf Steuerung gehen, dort steht wie alles gesteuert wird. Hier ein Screen: http://www.fotos-hochladen.net/quickdrawminigamez 6lfe38d.png



All times are GMT +2. The time now is 06:11.


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.