Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 12:00

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

Advertisement



Wrong Return

Discussion on Wrong Return within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2010
Posts: 9
Received Thanks: 0
Wrong Return

Hello,

I just learning AutoIT. I'm trying write my function from Delphi to AutoIT

My Delphi code :

Quote:
i := 0;
cs_adr := func.MemReadInteger(LoginCharList);
p_selected := func.MemReadInteger(LoginSelectedChar);
p_point := cs_adr + (p_selected * LoginCharListDist);
address_end := func.MemReadInteger(LoginCharListEnd);
lastchar := ((address_end - cs_adr) div LoginCharListDist) - 1 ;

//read all characters
namesize := func.MemReadInteger(cs_adr + (i * LoginCharListDist ) + LoginCharListDistNameSize);
and I wrote it to auto IT like that..

Quote:
$i = 0
$cs_adr = MemoryReadInt($LoginCharList)
$p_selected = MemoryReadInt($LoginSelectedChar)
$p_point = $cs_adr + ($p_selected * $LoginCharListDist)
$address_end = MemoryReadInt($LoginCharListEnd)
$lastchar = ($address_end - $cs_adr) / Round($LoginCharListDist,1) -1

; read all characters
$namesize = MemoryReadInt($cs_adr + ($i * $LoginCharListDist) +
$LoginCharListDistNameSize)
and I have on delphi return 6 (correct) and on AutoIT 0, could anyone help me what I 'm doing wrong? ;/
maches is offline  
Old 09/11/2013, 16:24   #2
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
Just saying that div is not the same as Round, you should use:
Code:
Int(($address_end - $cs_adr) / $LoginCharListDist)
instead.
alpines is offline  
Reply


Similar Threads Similar Threads
I HAS RETURN!
06/26/2012 - Say Hello - 13 Replies
Hello ppl. I have returned after 2 years GAP (ONE PIECE!). How have u all been? Any major changes to the forums? :* heres a comeback kiss for y'all!
Return to WOW, HOW to??
11/17/2011 - World of Warcraft - 6 Replies
Aloha zusammen, also nach einer langen pause habe ich mal wieder "bock" auf wow... naja jetzt habe ich nur keine ahunung mehr zu nix. ich hab damals noch ICC mitgemacht und dann war ende. ist der (wieder)-einstieg machbar? was brauch ich da für nen rechner , so ca? es soll schon wieder ein addon anstehen? und gibt es noch dieses "werbe einen freund ,für mehr ep,s und mount? all solche sachen eben frag ich mich, und ich sage euch jetzt schonmal:
wtb return orb eu3
04/05/2011 - Archlord Trading - 1 Replies
need to buy one return orb on brumhart/gaiahon pls /i'll trade other cc items or pay in gold(good)...
Should i return?
01/30/2010 - 12Sky2 - 5 Replies
Would you like me to come back and start releasing again?



All times are GMT +1. The time now is 12:00.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.