| 05-10-2006, 03:27 AM | #1 |
I know about the return bug and all that good stuff, and I've been using it a lot lately. Now, I've looked at a lot of codes lately, and I've noticed that no one uses an H2S function, but instead uses I2S(H2I()). Is there a reason for this? Would this not work...? JASS:function H2S takes handle h returns string return h return "" endfunction I'm just wondering because from what I know of the return bug, it should work, but no one has done this, even thought it would be faster. |
| 05-10-2006, 03:37 AM | #2 |
There is a big difference between converting handle to int and converting int to string. If you do handle to string thing it will try to use the memory address pointed by handle as a string. It will crash for sure instead I2S(H2I()) will make a string whose contents are the integer version of the memory address of the handle |
| 05-10-2006, 04:50 AM | #3 | |
Quote:
|
| 05-10-2006, 02:35 PM | #4 |
memory is nothing more than digits ... |
