| 03-03-2006, 02:43 PM | #1 |
Hey all.. I was wondering what an integer unitID is. I know about using 4-digit codes for unitIDs, but I don't really understand the number ones. Could anyone please explain it to me? -Soultaker |
| 03-03-2006, 02:52 PM | #2 |
the 4 digit codes are numbers integers in JASS have many possible representations: 12 , -2 , plain decimal numbers 0xFF , 0x0FFFFFFF - Hex 0345 - Octal And of course: 'A' 'Character' , can't really be added to strings, it seems to just convert ANSI to integer like 'd' means 100 for JASS 'Aloc' : 4 characters it is actually a way to say a big number like 1030300124 but only typing the 4 bytes that integer represents. And it is used by unit ids , ability ids, and item ids And yes 'Aloc' is an integer |
| 03-03-2006, 02:54 PM | #3 |
4-digit code is integer. for example 'u000' is integer value. EDIT: and vexorian's quick too |
| 03-04-2006, 12:50 PM | #4 |
okay.. I didn't really get all what you said, like how it transforms "Aloc" into numbers, say... If I wrote "Uloa", I don't know what the outcome would be. But anyway, if I have to write an UnitID in Integers, I should just write the 4-digit code right? Like, I'm gonna use this, I should just write it as the 4-digits. Am I correct? -Soultaker |
| 03-04-2006, 04:30 PM | #5 |
If the function takes a unit parameter then you can't use the unit id, it needs to be a specific unit not a unit type. If it takes an integer parameter called unitid or similar then yes, use the 4 letter code. |
