• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Integer Issue

Status
Not open for further replies.
Level 16
Joined
Jan 5, 2008
Messages
1,805
I don't realy know how to put this, or name it.
The problem is, my Condition. The purpose of it is to check if the player got 50 minerals or moore. If he got it, or moore, the action will be run.

This is how it looks like: (Player (Triggering player) Minerals) == 50

I can't find anything that let's me choose 50 and all integers above it. I can simply only have 50. Wich doesn't work when the player get's above those minerals.
Basicly, what I need is some way to check if the player got 50 minerals or moore.

I hope you understand what I mean.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,180
Well it demends. I believe how a CPU for your computer works is by comparing both integers firstly (no mater the comparision). Doing this then sets a series of binary flags held in registers to the outcome of the comparision opperation. In the case of if statements and like constructs, it then uses a jump instruction based on the comparision you used. For example if you do greater than or equals to, it will jump only if less than (as to skip the actions you want run). If there are else actions it jumps to them and at the end of the normal actions jumps to after the else actions.

Do not make up nonsense like "X is slower" unless you can prove it. All my assembly programing with CISC micro controlers has taught me that there are multiple ways to do something and how it gets done is different from how you might think it would as someone who does not know how it is done.

Additionally the number of clocks per opperation varies from processor model to processor model even though they use the same instruction. Although they are generally the same nowdays due to the ammount of optimization put into them, it is possible for one processor to do comparisions 1 cycle faster than another if the comparision process can be streamlined to be so (highly doubt it due to the ammount of time spent on doing this).
 
Status
Not open for further replies.
Top