wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Resources > Code Resources > Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 11-10-2009, 05:37 PM   #106
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Quote:
Originally Posted by Vexorian
What would be the other debug stuff?
Quote:
Originally Posted by Code
Collapse JASS:
    if g == null then
        debug call BJDebugMsg(SCOPE_PREFIX+"Error: Null groups cannot be released")
        return false
    elseif not HaveSavedInteger(ht, 0, id) then
        debug call BJDebugMsg(SCOPE_PREFIX+"Error: Group not part of stack")
        return false
    elseif LoadInteger(ht, 0, id) == 2 then
        debug call BJDebugMsg(SCOPE_PREFIX+"Error: Groups cannot be multiply released")
        return false
    elseif Count == 8191 then
        debug call BJDebugMsg(SCOPE_PREFIX+"Error: Max groups achieved, destroying group")
        call DestroyGroup(g)
        return false
    endif
__________________
Rising_Dusk is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 11-10-2009, 06:39 PM   #107
Troll-Brain
User
 
Join Date: Oct 2006
Posts: 1,490

Submissions (1)

Troll-Brain has a spectacular aura about (134)

Default

I would do all checks only in debug mode include the hashtable thing, but it's me and you probably hate this idea.
Or you could add a constant boolean ZOMG_SPEED_FREAK, UNSAFE_WAY or so.
and if this constant is egal to true, skip all the checks with a static if.

Last edited by Troll-Brain : 11-10-2009 at 06:42 PM.
Troll-Brain is offline   Reply With Quote
Old 11-10-2009, 07:00 PM   #108
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

I cannot see a case where you'd ever call ReleaseGroup in a speed-critical environment, but what do I know?
__________________
Rising_Dusk is offline   Reply With Quote
Old 11-10-2009, 07:18 PM   #109
Troll-Brain
User
 
Join Date: Oct 2006
Posts: 1,490

Submissions (1)

Troll-Brain has a spectacular aura about (134)

Default

Quote:
Originally Posted by Rising_Dusk
I cannot see a case where you'd ever call ReleaseGroup in a speed-critical environment, but what do I know?
Honestly me neither, it's more just "because"
Troll-Brain is offline   Reply With Quote
Old 11-18-2009, 03:34 AM   #110
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Updated.
  • Absorbed this functionality into GroupUtils.
  • Added a LESS_SAFETY constant boolean that nutjobs (Like Vex) can set to true if they don't want the doublefree protection this library offers.
  • Updated the documentation for the updates.
__________________
Rising_Dusk is offline   Reply With Quote
Old 11-18-2009, 03:40 AM   #111
Deaod
User
 
Join Date: Jan 2007
Posts: 542

Submissions (11)

Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)

Default

Dusk, you should allow to call ReleaseGroup on groups that are not part of the stack. Theres no pain involved in doing this, so why not?
__________________
Deaod is offline   Reply With Quote
Old 11-18-2009, 05:03 AM   #112
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

I thought about it, but I somehow really like the idea of the user not releasing things they create on their own.
__________________
Rising_Dusk is offline   Reply With Quote
Old 01-24-2010, 04:22 PM   #113
Troll-Brain
User
 
Join Date: Oct 2006
Posts: 1,490

Submissions (1)

Troll-Brain has a spectacular aura about (134)

Default

A null boolexpr doesn't leak anymore inside a GroupEnum function.
Troll-Brain is offline   Reply With Quote
Old 01-24-2010, 04:53 PM   #114
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

I know, but for backwards compatibility it is necessary to keep it in GroupUtils.
__________________
Rising_Dusk is offline   Reply With Quote
Old 01-24-2010, 11:41 PM   #115
blanc_dummy
User
 
blanc_dummy's Avatar
 
Join Date: Jun 2007
Posts: 106

Submissions (1)

blanc_dummy has little to show at this moment (7)

Send a message via Yahoo to blanc_dummy
Default

since in my country people keep using 1.24b :D. so it's still needed :)
__________________
blanc_dummy is offline   Reply With Quote
Old 02-03-2010, 09:24 PM   #116
grim001
requires vJass
 
grim001's Avatar


Code Moderator
 
Join Date: Nov 2006
Posts: 1,540

Submissions (10)

grim001 is just really nice (277)grim001 is just really nice (277)

Send a message via AIM to grim001
Default

You can remove the code that compensates for a null boolexpr passed to any of the enum functions now. Won't break reverse compatibility.
grim001 is offline   Reply With Quote
Old 02-04-2010, 09:29 AM   #117
Anachron
User
 
Anachron's Avatar
 
Join Date: Mar 2009
Posts: 1,079

Anachron will become famous soon enough (51)Anachron will become famous soon enough (51)

Default

You could add an AddGroupToGroup with boolexpr.
__________________
CustomInventory [Discussion - Download] - Got Directors Cut!
CustomMissle [Discussion - [Download (not yet)] - In development!
Other systems [Spawn System] [Move System] [CustomBar] [SpellBar]
Anachron is offline   Reply With Quote
Old 02-04-2010, 02:20 PM   #118
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Quote:
Originally Posted by grim001
You can remove the code that compensates for a null boolexpr passed to any of the enum functions now. Won't break reverse compatibility.
I could, but it changes nothing functionally or speed-wise if I don't, so.
Quote:
Originally Posted by Anachron
You could add an AddGroupToGroup with boolexpr.
Eh. Maybe it could be useful, I'm not sure. I've never had a use for that before, since the only time I ever copy a group is when I want the whole group (and we have a BJ for that). If you can rally enough support for it from serious coders, then sure.
__________________
Rising_Dusk is offline   Reply With Quote
Old 02-04-2010, 02:44 PM   #119
Anachron
User
 
Anachron's Avatar
 
Join Date: Mar 2009
Posts: 1,079

Anachron will become famous soon enough (51)Anachron will become famous soon enough (51)

Default

Sure, if for example you want to make a private unit and a method to get all the units affected, then you can allow the user to run a filter on that aswell.

I use it for touched units with my missle system, so I can get the enemies only.
__________________
CustomInventory [Discussion - Download] - Got Directors Cut!
CustomMissle [Discussion - [Download (not yet)] - In development!
Other systems [Spawn System] [Move System] [CustomBar] [SpellBar]
Anachron is offline   Reply With Quote
Old 02-04-2010, 03:50 PM   #120
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

And why wouldn't you just do a GroupEnumUnitsInArea with your filter instead?
__________________
Rising_Dusk is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 07:55 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services