• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Group Lab] Found anything interesting that can't be solved? Lets discuss it here!

Status
Not open for further replies.
Level 22
Joined
Sep 24, 2005
Messages
4,821
Yeah, but I won't believe them without tests, at least that's how I roll when I was at wc3c.

I'm gonna call it jaws and vjaws from now on.
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
Yes, you don't have to believe me.
tests > all, that's how jass myths dead, or at least don't born.
Also it could be fixed since some patch, we all know how Blizzard fix them quickly :ogre_hurrhurr:

If the handle stored in the variable is likely to be destroyed, then yes you should null the variable, if not that really doesn't make any sense if there is a leak, even for jaws, that beats any logic.
I honestly think that you didn't understand what Maker said or himself wasn't aware about the leak i've mentionned, or something like that.
We're all a bunch of amateurs anyway.
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
@Troll-Brain; Earlier today, I was asking Malhorne if he thinks nulling global variables was good practice, he told me Maker said so, I couldn't believe it so I asked your opinion about it. I wasn't very active those years, I wasn't able to get hold of that information about that awesome feature blizzard put onto jaws2, so I kept on telling Malhorne it was useless, as if I was a madman. Blizzard is fucking awesome.

EDIT: My previous reply was about Maker telling him it leaks, saying it leaks was so vague, I couldn't believe it. I didn't mean to say I won't believe you, or Maker, I just wanted to make sure. Sorry about that dude.

I just got used to seeing people tell "x is slow" without tests so I usually dismiss them as hoax.
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
No problem, as i told you i was serious, you don't have to believe me and anyone else.
I think i'm one of the most accurate people there, but sometimes i still can say some shit, like every human in fact.

Tests > all, check my signature.
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
Jake discovered something useful, removing the timed life from an illusion created from the Item illusion thing (can't remember exactly). Pretty neat, I just learned it now, I dunno if it's already known though.
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
@Troll-Brain: dude do you know the GetWidgetLife bug? The one associated with checking for a dead unit?
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
I only know that actually an unit die when his life reach lower than X, it should be a little more than 0.4.
I'm sure you can find the answer somewhere.

The GUI function just check for 0, which is not enough, but well even with the exact value it's still lame, still IIRC you can give some life to a dead unit, and even some passive abilities will do (at least that's what i've read).

I used IsUnitType(UNIT_TYPE_DEAD) and GetUnitTypeId() != 0

Some people also use the native AI function UnitAlive.

I suppose all solutions have pro and cons and might return true or false under some defined situations (unit is resurecting and so one).
And i think the best option would be use a custom function with one function argument and some constants (or maybe just a boolean, depends how many behaviors we have), then you can consider resurecting unit like dead or alive, stuff like that.
But here i'm just guessing that all solutions have a different behavior under some defined situations. And yes speedfreaks should be killed :p

I don't know any bug about it, ofc that doesn't mean there are none.

Chobibo go back to work, this half of half of half test is really a shame !
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
Which one? I tested "aAAa" against "aaaa", the results were true, but the other one ("a\b" against "a\\b") doesn't even compile ("a\b") in both vanilla WE and JNGP.
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
How'd you make that work? Vanilla just crashes on me when I try that. Gonna try the ab thing later, I'm busy atm hehe :D
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
Well, he has just tested and yes my claim was true (and gamecache key don't act like that), no crash whatever.
It should be something else which causes the crash, that doesn't make sense that a simple string "a/b" cause the worldeditor to crash on saving ...
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
I tested it on a blank map, dunno what else could it be though. Another case of Weird Editor... Oh I forgot to tell you that when it crashes, the map files aren't compressed, meaning all those *.* are left scattered on the save directory. Do note that the crashes happen on the vanilla editor.

EDIT: okay, I tested it again this time, for some reason it didn't crash, @_@ weird shit... Oh and StringHash("a/b") and StringHash("a\\b") is not equal. I'm using the vanilla Editor.

Heres the jass script:
JASS:
//===========================================================================
function InitTrig_Melee_Initialization takes nothing returns nothing
local integer a=StringHash("a\b")
local integer b=StringHash("a\\b")
call BJDebugMsg("a is equal to "+I2S(a))
call BJDebugMsg("a is equal to "+I2S(b))
endfunction

The result was:
122581-albums6867-picture76123.jpg


Uh-oh, TB is now pissed! *runs away*
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
Ahaha XD, sorry about that...
EDIT: Tested it, they're equal
JASS:
function InitTrig_A takes nothing returns nothing
 local integer a=StringHash("a/b")
 local integer b=StringHash("a\\b")
 call DisplayTextToPlayer(GetLocalPlayer(),0,0,I2S(a))
 call DisplayTextToPlayer(GetLocalPlayer(),0,0,I2S(b))
endfunction

String_Hash_test.jpg
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
Yeah, I failed once more. I'm going to move on to particle emitters, at least they're more dumb friendly haha XD.
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
Oh, the ability doesn't show in-game when I tested it. It could be used as a marker ability though.
 
Status
Not open for further replies.
Top