Sign in to follow this  
Followers 0
darkmaster071

Autoit miscalculates? Am i going crazy?

3 posts in this topic

#1 ·  Posted (edited)

I have a loop like this: While $count<=$total ... and when $count gets bigger then 1 it passes the loop. $total is always 14.

2<=14 -false

5<=14 -false

...? Anyone got any ideas?

Weird thing is that the loop worked perfect until recently and i havent changed any of its content. I only changed how $count value gets set. That is from an .ini file.

EDIT: Yeah it works if i just set a number like $count=5, but it does not work when i have $count=iniread... Why? Help greatly appreciated.

Edited by darkmaster071

Share this post


Link to post
Share on other sites



Weird thing is that the loop worked perfect until recently and i havent changed any of its content. I only changed how $count value gets set. That is from an .ini file.

Your read "value" will be a string in stead of a number.

Change the read value from the INI file to a real value with Number().


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Yep, works. I knew that someday the autoit all-in-one variable will get to me :mellow: Thanks for your help and your fast reply.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0