• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Patch 1.23b, JASS, GUI, and Gaming

Status
Not open for further replies.
Level 21
Joined
Aug 21, 2005
Messages
3,699
I assume Griffen meant that dead code should not be allowed. conditional code (if/then/else) should ofcourse still be allowed. Anyway, a) won't solve the problem completely, since you would still be able to return wrong types through something such as "if true then return h else return 0; return 0". Besides, most compilers I've used still allow dead code, they only give warnings but still compile it. In the end, dead code shouldn't cause any trouble at all, it's no typechecking that causes the trouble here.
 
Level 14
Joined
Nov 20, 2005
Messages
1,156
I assume Griffen meant that dead code should not be allowed. conditional code (if/then/else) should ofcourse still be allowed. Anyway, a) won't solve the problem completely, since you would still be able to return wrong types through something such as "if true then return h else return 0; return 0". Besides, most compilers I've used still allow dead code, they only give warnings but still compile it. In the end, dead code shouldn't cause any trouble at all, it's no typechecking that causes the trouble here.

Dead code's a mistake. b would be necessary and sufficient really to fix the return bug. a would just be extra.
 
Level 15
Joined
Jul 19, 2007
Messages
618
wow i just had hard time with my librarys making coz some natives dont work...

JASS:
local hashtable ht = InitHashtable()
call SaveInteger(ht,0,0,5)
call SaveReal(ht,0,1,bj_PI)
call RemoveSavedInteger(ht,0,0)
call RemoveSavedReal(ht,0,1)
call BMsg(HaveSavedInteger(ht,0,0)) // result: true
call BMsg(HaveSavedInteger(ht,0,1)) // result: true

for handle it works did not test for boolean and string...
lols

~DD
 
Level 15
Joined
Jul 19, 2007
Messages
618
i am on 1.24 but i had problems with my account ... if u want u can do it (i mean only if u want) and btw i am not sure where to post it (ofc to blizzard but maybe here Report)
...

nvm i was an idiot... found it but as i said have some problems it tells me that it cant detect my account name or password!

so again if u want feel free to do so!

~DD

EDIT: lol i was not on battle.net for so long it seems my account got deleted or wtf?
well well its always like that... i dont even remember when i was last time on battle.net lol played dota and owned some freaks then they kick me and i was so pissed so i did not play from that time :S
 
Last edited:
Level 8
Joined
Aug 4, 2006
Messages
357
I have dowloaded 1.24. I did tests with all the primitive types and it seems none of them get removed (you can still load the values after they are removed). This results in HaveSaved<type> to screw up and always return true after a value has been stored in that slot for the first time. I will report this to blizzard.
 
Level 8
Joined
Aug 4, 2006
Messages
357
Ah, that's good. (I didn't get a chance to test hashtables till now.)

Can anyone tell me why the only hashtable functions that show up for me in the JNGP function list are SaveX, LoadX, and InitHashtable? RemoveSavedX and HaveSavedX aren't showing up for some reason... they all compile without error...
 
Level 15
Joined
Jul 19, 2007
Messages
618
Ah, that's good. (I didn't get a chance to test hashtables till now.)

Can anyone tell me why the only hashtable functions that show up for me in the JNGP function list are SaveX, LoadX, and InitHashtable? RemoveSavedX and HaveSavedX aren't showing up for some reason... they all compile without error...

i dont know what u mean but they show for me...

and btw i cant explain the bug but sometimes SaveInteger does not overwrite the value i mean if i save 0 over 6 for example it will not save the 0 but 6 will remain... crazy bugs!

still cant find why that happens (its in special cases) and i get an access of memory violation error randomly in my map which means that HaveSavedX is kind bugged... in some cases... still cant find them its used in mass systems and algorithms are complicated so yeah...

~DD
 
Level 12
Joined
Aug 7, 2004
Messages
875
Ok so basically they turned every custom hash table systems made into natives?

And if 1.24 screws up the return bug then is there a way to resolve this because in all 4 of my maps including 1 I'm making, they all use CSCache, XE, and other systems that use that return bug.
 
Level 12
Joined
Aug 7, 2004
Messages
875
What damned employees would intentionally or unintentionally screw the wc3 community. I mean seriously they should know things like this if they're updating.

Controversially, it could be that they don't give a damn about this game cuz they already got a new extravaganza at work, sc2...
 
Level 15
Joined
Jul 19, 2007
Messages
618
What damned employees would intentionally or unintentionally screw the wc3 community. I mean seriously they should know things like this if they're updating.

Controversially, it could be that they don't give a damn about this game cuz they already got a new extravaganza at work, sc2...

this update patch (1.24) is out to revive wc! you just dont know it but this is really awesomeness what blizzard is currently doing...
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
I dont know if you have paid any attention to this, DoOs_101, but Blizzard has had close contact with Vexorian and others (i have heard),
And all you have to do is make sure the H2I function is private or public, and replace
JASS:
return h
return 0
with return GetHandleId(h)

Only when you use any I2H (like I2Trigger or I2Timer) you got a problem, but there are other solutions to this problem that are as well usable as I2H,,
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Or for even more efficency just use a search and replace of all references of H2I( with GetHandleId(. This is not only easier, neater but also makes the resulting code faster as it takes advantage of the native's new speed instead of wrapping it for some reason.

Why did vexorian not think of this is beyond me but it should be far more effective than simply just changing it to a wrapper function.
 
Level 14
Joined
Nov 20, 2005
Messages
1,156
Or for even more efficency just use a search and replace of all references of H2I( with GetHandleId(. This is not only easier, neater but also makes the resulting code faster as it takes advantage of the native's new speed instead of wrapping it for some reason.

Why did vexorian not think of this is beyond me but it should be far more effective than simply just changing it to a wrapper function.

...except that Vexorian's JassHelper will inline it? Meaning that your efficiency argument goes out of the window.
 
Level 12
Joined
Aug 7, 2004
Messages
875
I dont know if you have paid any attention to this, DoOs_101, but Blizzard has had close contact with Vexorian and others (i have heard),
And all you have to do is make sure the H2I function is private or public, and replace
JASS:
return h
return 0
with return GetHandleId(h)

Only when you use any I2H (like I2Trigger or I2Timer) you got a problem, but there are other solutions to this problem that are as well usable as I2H,,

Alright thats good!

I don't know if I use I2H and other Iinteger 2 something, but does CSCache use all of them? If so then I'm damned and need of an update on that system @@.
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
DSG: Yes it is better to search for the call H2I( and replace it,
but lazy people can just change the content of the H2I function as long as it is public or private, since Blizzard is gonna make their own H2I native (as you probably know,,).
 
Level 9
Joined
Jan 22, 2009
Messages
346
when the 1.24 officially come out?
Not so sure, the only way to get it currently is through Westfall server on Battle.net as a BETA patch, but if you would like to play DotA and some popular scenario's I wouldn't recommend patching it yet.

For now, we would have to wait until its real release.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
The guy on the blizzard forum for diablo II said they neary had completed 1.24.

They are probably holding it off release until DotA is updated to work in which case the difference of release should be a few hours atmost. Although this sounds crule, if they did not do this WC3 would die over night.
 
Level 6
Joined
Jun 30, 2006
Messages
230
offtopic: I think Dr Super Good explained the broken primitives at least 10 times...

I just thought I'd mention that amusing tidbit.
 
Level 12
Joined
Aug 31, 2008
Messages
1,121
Ok, I just have to go to westfall beta, right?
EDIT: Why do all the save functions return booleans? Is it checking if it already there, or putting it there and telling you if it did or something?
And should I just replace this in local handle vars, or just drop local handle vars completely?
 
Last edited:
Level 10
Joined
Feb 20, 2008
Messages
448
o_O its a good news for who know how fix it ............ most of my trigger are imported o_O i dont know alot of jass, i read lot post in topics and since im french i failed at understanding o_O

.... Hope some1 could help me fix it o_O i use newjassGen i did change j.file and since i saw gui could use returns bug o_O im more screwed............ lol

help would be nice and imba credits would be gave :O lot chance for poeple to get credits ^^, and im sure im the the only 1 that probly have this bug and dont know how to fix it or what it is o_O

edit : i dont know if its normal i cannot index an special effect variable o_O

is there anyplace i can learn how to use new hashtable ?
 
Last edited:
Status
Not open for further replies.
Top