--Thanatos--
New Member
- Reaction score
- 33
It's so damn short. >_>
So I guess we can replace GetHandleInt and etc with it's main use, isn't it ?
So I guess we can replace GetHandleInt and etc with it's main use, isn't it ?
...
call StoreInteger(GameCache(),I2S(H2I(timer)),"Unit1",H2I(unit))
...
function T_Unit1 takes timer t returns unit
local integer i=GetStoredInteger(GameCache(),I2S(H2I(t)),"Unit1")
if(i!=0)then
return i
endif
return null
endfunction
for i=0 to NumberOfDigits
tmpstring(i) = number mod 10
number = number / 10
endfor
function T_Unit2 takes timer t returns unit
local integer i=GetStoredInteger(GameCache(),I2S(H2I(t)),"Unit2")
if(i!=0)then
return i
endif
return null
endfunction
I2S is extremely taxing,
for i=0 to NumberOfDigits
tmpstring(i) = number mod 10
number = number / 10
endfor
It's so damn short. >_>
Umm... sure. I mean, I write my own functions... yes. I don't use handle attaching, just id storing. Just store H2! on the handle, and then write a function to get exactly what you stored (that's how I do it). I have a weird method I guess.
you tend to jump into conclussions, do you?
Bag. It is an item, which you can drop other items into. All those items are held under reference of the bag item (And some people would want a bag with 100+ items (although I would never do that)). Also, I have to store handling information for the bag - The unit that currently owns it, and a few dummy units used for temporary item storage (like when I open up a move item menu in the bag). So, we get 104, if you store 100 items in the bag. Of course, you could just as easily store 40,000, or just 12. It really needs an infinite range.