| 12-12-2009, 11:59 PM | #1 |
Not really, but it works. Yes, I benchmarked it and it's about the same speed as hashtables. With less functionality ofc. The only sideeffects I could see are if the index is a tech-id. I don't expect (or suggest) this to be used, I just thought it was neat. Oh and there are other Player-Tech natives that allow you to store/get. These were just the fastest. JASS:library test globals player IDLE_PLAYER = Player(PLAYER_NEUTRAL_AGGRESSIVE) endglobals function HoldInteger takes integer index, integer value returns nothing call SetPlayerTechMaxAllowed(IDLE_PLAYER, index, value) endfunction function GetHeldInteger takes integer index returns integer return GetPlayerTechMaxAllowed(IDLE_PLAYER, index) endfunction endlibrary |
| 12-13-2009, 08:18 AM | #2 |
more then useless, just boundless array. |
| 12-13-2009, 11:37 AM | #3 | |
Quote:
Are you sure you don't mean "less than useless"? More than useless doesn't make a whole lot of sense. I really don't see why people post in these forums to give this kind of feedback. DioD your reply to his useless thread is useless in itself. For a beginner, the concept displayed here could be used as a useful learning tool, so you're really out of place in saying its useless DioD. |
| 12-13-2009, 03:00 PM | #4 |
Use hashtables Be happy Dont troll on forums |
| 12-13-2009, 03:15 PM | #5 | ||
Quote:
Quote:
|
| 12-13-2009, 03:46 PM | #6 |
Useless or not it is quite funny! |
| 12-13-2009, 06:16 PM | #7 | |
Quote:
I know it's useless. Doesn't mean it's not neat. |
| 12-15-2009, 01:41 AM | #8 | ||
Which is why it wasn't posted in the submissions, rather the Triggers & Scripts. A beginner may not understand how Hashtables works, in which case allowing them to begin with alternate means of integer attaching could be beneficial to their learning. Quote:
Even aside from this dumb argument, why would DioD need to comment on the quality/usefulness of this when TriggerHappy already agrees with him. That's just plain bad manners... has this site ever gotten unfriendly to the common folk. Everybody is on the moderators balls though. Quote:
You just make yourself sound less credible by talking like this. I'm not even going to continue arguing, so pathetic lmao. |
| 12-15-2009, 03:01 AM | #9 |
Diod was stating a fact, he meant no disrespect, nor did Rising Dusk. Even TriggerHappy admitted it was useless, he was just showing that it was a possibility, which is cool(?). |
| 12-15-2009, 10:07 PM | #10 |
Hold a moment... DID you test this? Code:
call HoldInteger(50,25)
call DisplayTextToForce( GetPlayersAll(), I2S(GetHeldInteger(50)) )returns 0 |
| 12-16-2009, 01:32 AM | #11 |
You need to use a valid technology. |
| 12-16-2009, 03:12 AM | #12 |
No you don't. I accidentaly posted the wrong version. Updated. |
| 12-16-2009, 08:08 AM | #13 |
Ehrm, what is this? |
