System Swap System

Vestras

Retired
Reaction score
248
Nothing...
Damn, you got a point. I'll make a boolean for not create buttons for players who don't got any heroes.
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
You should use an array struct, but you can do it also with 2D array, for fun :p
 

Flare

Stops copies me!
Reaction score
662
Why did I use 2D arrays? Well, I needed to store 2 sets of up to 6 things, and 2D array was just a convienience - there's no requirement to do it (you could just do i + 6 for one set of array indexes, and have a one-dimensional array), but, as I said, I just used it because it was fairly convienient

I just wanted to clear up the code a bit, actually help. No harm meant.
None taken, but alot of them seem quite obvious

Anyway, as regards the null thing, there wasn't any need to comment it out (or have it). Playercolors may not need nulling, but nothing bad will happen (at least it shouldn't anyway) if you do null it

EDIT: ...
Code:
//*    Furthermore, I would like to thank Flare for his
//*    eternal pester about me improving the code :p
//*    Without him [B][COLOR="Red"]this script would leak badly[/COLOR][/B]
:confused: I mentioned leaks?
 

saw792

Is known to say things. That is all.
Reaction score
280
>I mentioned leaks?

You probably instilled in him the desire and motivation to check his code for leaks, rather than actually pointing them out. Yeah, that sounds plausible enough.
 

Vestras

Retired
Reaction score
248
You should use an array struct, but you can do it also with 2D array, for fun :p

Dude, I'm not gonna change it. Why? Because it doesn't matter. Speed isn't needed.

Flare >

What saw said.

So is there any more coding mistakes or is this approved?
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
Dude, I'm not gonna change it. Why? Because it doesn't matter. Speed isn't needed.
But you forgot the string "leak" by using I2S(H2I), and it requires Table for nothing, because you can do it simply with a struct, instead of using cache.
 

Vestras

Retired
Reaction score
248
But you forgot the string "leak" by using I2S(H2I), and it requires Table for nothing, because you can do it simply with a struct, instead of using cache.

I can, but I won't. I see no reasons.
What? I never used I2S(H2I)...


Gwypass >
Yes, I do.
And I don't understand your question.
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
I can, but I won't. I see no reasons.
Then don't hope it will be approved, at least not on www.wc3campaigns.net, you already use vJass, so use cache when there is absolutely no need is very lame.

What? I never used I2S(H2I)...
And you think Table use some vodoo thing ?

EDIT : Hmm yes you're right for the I2S(H2I(... thing because you use a string Table, but it's steal lame.
 

Flare

Stops copies me!
Reaction score
662
Can you two please give it a rest... personally, I see no major issue with gamecache being used here. There is alternatives, but what's done is done, and it's not going to break the game. Anyway, the system is only enabled for 2 minutes of game-time and it's not likely you will do much swapping in that time (I can see about 20 being a max in a 12-player game, taking into account denied swaps as well) and you're not going to have a phenomenal amount of string leaks from that

Also, could be done with global arrays and GetPlayerId, assuming dialog button clicked events return a GetTriggerPlayer (I've never worked with dialogs so I don't know if they do or not)

In the end - I'm not going to push any particular method on you, whatever works is fine by me. If another mod wants it changed, so be it, but until then, take your pick as to what's going to happen with passing data
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
Can you two please give it a rest... personally, I see no major issue with gamecache being used here. There is alternatives, but what's done is done, and it's not going to break the game. Anyway, the system is only enabled for 2 minutes of game-time and it's not likely you will do much swapping in that time (I can see about 20 being a max in a 12-player game, taking into account denied swaps as well) and 20 unique I2S (H2I (...)) isn't going to kill you

Also, could be done with global arrays and GetPlayerId, assuming dialog button clicked events return a GetTriggerPlayer (I've never worked with dialogs so I don't know if they do or not)

It's like going to school with a bike even if you can take the bus for free.
Sure you will arrive, but it will take you much time for nothing, unless you are fat :p

GetTriggerPlayer() work fine with dialogs, hopefully ...
 

Vestras

Retired
Reaction score
248
It's like going to school with a bike even if you can take the bus for free.
Sure you will arrive, but it will take you much time for nothing, unless you are fat :p

I do that, I arrive faster than the bus.
GTFO. :p

So, Flare, I guess this is approved then?
 

Flare

Stops copies me!
Reaction score
662
GTFO = Get the f*ck out

So, Flare, I guess this is approved then?
Did I say that it was approved? If I did, it'd be approved, but since I haven't it's not approved just yet

Be patient, gonna give it a little more time, must do another lookover, and gonna wait for more thread-related responses (i.e. will people make use, is there anything they feel could be improved, etc.), it's only been 2 days and 3 posts that aren't code-related or spam, which doesn't give a good enough overview
 

Vestras

Retired
Reaction score
248
Okay, gives me time to update this with the things posted at clanmapz.com.
As long as you don't forget it, or more likely, I forget it :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top