• 🏆 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!

RE: Patch v1.24 update in the latest news

Status
Not open for further replies.
Level 2
Joined
Feb 13, 2009
Messages
20
This one:

JASS:
function getStringFromStringtable takes integer i returns string    
    return i     
    return ""
endfunction

It was used to get a string from string table. I was just wondering what stuff we loose for good and this is one of them.


I'm not sure if it completely replaces your function, but strings can be stored in the hashtable
 
Level 2
Joined
Feb 13, 2009
Messages
20
It has nothing to do with hashtables...


of course it doesn't, they used it before hashtables...............smell the coffee

however, you can use hashtable to create a 2d string array.

or a 1d string array that can be attached to anything you wanted


EDIT:

Is anyone updating the TESH database so that the new functions show up in the function list?
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
of course it doesn't, they used it before hashtables...............smell the coffee

String2Id returns the index of the string in the StringTable. I don't see how storing strings in hashtables is in any way related to this.

Is anyone updating the TESH database so that the new functions show up in the function list?
Why don't you ask the author on wc3c.net ?
 
Level 2
Joined
Feb 13, 2009
Messages
20
String2Id returns the index of the string in the StringTable. I don't see how storing strings in hashtables is in any way related to this.

in that case, StringHash() will convert your string into an integer that can be used as your index in the hash table.

for example SaveString( mystringtable, StringHash("hello"), 0, "Hello")
and to retrieve it : LoadStr(mystringtable, StringHash("hello"), 0 )

thus the hashtable replaces the StringTable, LoadString()/SaveString() does the allocation/retreival, and StringHash() replaces String2Id.
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
in that case, StringHash() will convert your string into an integer that can be used as your index in the hash table.

for example SaveString( mystringtable, StringHash("hello"), 0, "Hello")
and to retrieve it : LoadStr(mystringtable, StringHash("hello"), 0 )

thus the hashtable replaces the StringTable, LoadString()/SaveString() does the allocation/retreival, and StringHash() replaces String2Id.

That's not what string2id does. At all.

I'm not saying string2id is actually useful for anything. I won't miss it. But there's no alternative to string2id right now.
 
Level 22
Joined
Feb 4, 2005
Messages
3,971
Haha I'm glad I decided to not use a single jass trigger there. I don't like JASS, I hate it, I don't wanna learn it, I don't care about it and never did.

Works for me just perfectly, and the new map size considering I couldn't host a map above 4MB, now I can. Just awesome!
 
Level 8
Joined
Aug 6, 2008
Messages
451
Dont be confuced. This patch doesnt change the fact that Jass is superior to GUI. Its just most of those old maps that suffer from it. ( like DotA ) Those maps that used old ways of doing data attaching and stuff like that.

Thanks to all cool vJass systems, all I really need to do is update my Table and TimerUtils. ( Although, I might as well write some nice module stuff with hashtables for timer attaching, dont know yet )
 
Level 8
Joined
Aug 6, 2008
Messages
451
Well, I guess you are either using that shadowing locals thingy, or Blizzard fucked up their own returns in their own BJ functions.

I wouldnt be suprised lol.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
I would like to be asked one day about something. . . Yes I may not have a docterate yet but I am not too stupid.

Personally, blizzard really should fix the local null leak permantly as a bonous for the next patch, to make up for the faults with the first patch and the delay of the D2 patch. As I understand it is something like paramters which act as locals do not leak yet locals do unless you null them at the end for non constant handle objects.
 
Level 12
Joined
Aug 31, 2008
Messages
1,121
Has Blizzard made any statements about when they will update?

I can't play my map and I'm not using anything but GUI.

In my experience of opening maps to get models out of em (I know, I'm lazy) I have found that some BJ's are broken.
SaveGameCacheBJ is one of the prime BJ's in campaigns. A lot of my Med. Map guy stuff jsut broke.
I'm sure they're are others.


You can now shadow 2+ globals?
I thought they destroyed it completely.
 
Level 8
Joined
Aug 6, 2008
Messages
451
I was under the impression that they dont even know whats causing that null leak with declared locals, since it works fine with argument locals and everything, so they cant fix it so easily. ( Dont belive, I dont really remember where I heard that one )


Anyways, I think we can thank Vexorian for that GetHandleId function. Its good to know that Blizzard is listening him.
 
Level 12
Joined
Aug 31, 2008
Messages
1,121
Blizzard really should shower us with some new stuff.
Maybe some REALLY SWEET functions. Like one that makes projectiles.
Or some new melee or custom maps, that show off the Hash, like they used to.
New tavern hero?

vex rocks!
 
Status
Not open for further replies.
Top