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 04-03-2010, 06:15 PM   #181
jk2pach
User
 
jk2pach's Avatar
 
Join Date: Jan 2009
Posts: 43

jk2pach has little to show at this moment (1)

Default

I have the same kind of problems

I use a lot AutoIndex, but I have some "Blabla is a filtered unit" which appears strangely.
__________________
You want to pilot a F22 Raptor in Warcraft III?
Click here to know what I call map credits.

Last edited by jk2pach : 04-04-2010 at 09:17 AM.
jk2pach is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 04-05-2010, 09:48 AM   #182
ploks
User
 
Join Date: Jun 2007
Posts: 99

ploks has little to show at this moment (6)

Default

Got some kind of problem. OnUnitDeindexed doesn't seem to work : /

The following code gives not DebugMessage when a unit dies :(
Collapse JASS:
library Test initializer Init requires AutoIndex

/*struct h
private method onCreate takes nothing returns nothing
    call BJDebugMsg(GetUnitName(me)+" entered the game!")
endmethod
private method onDestroy takes nothing returns nothing
    call BJDebugMsg(GetUnitName(me)+" left the game!")
endmethod

implement AutoDestroy
implement AutoCreate
endstruct*/


    function UnitEntersMap takes unit u returns nothing
        call BJDebugMsg(GetUnitName(u)+" with ID "+I2S(GetUnitId(u))+" entered the map.")
    endfunction //Using GetUnitId() during Indexed events works fine...

    function UnitLeavesMap takes unit u returns nothing
        call BJDebugMsg(GetUnitName(u)+" with ID "+I2S(GetUnitId(u))+" left the map.")
    endfunction  //So does using GetUnitId() during Deindexed events.

    function Init takes nothing returns nothing
    local integer i = 0
        call OnUnitIndexed(UnitEntersMap)
        call OnUnitDeindexed(UnitLeavesMap)
        loop
        exitwhen i == 7
            call CreateUnit(Player(0),'hfoo',0,0,0) 
            set i = i+1
        endloop
        call CreateUnit(Player(1),'hfoo',0,0,0) 
    endfunction
endlibrary

Any ideas about what the problem is? I attach the testmap also. Also, the struct doesn't seem to work either (without the comments that is)
Attached Files
File Type: w3x test.w3x (40.1 KB, 10 views)

Last edited by ploks : 04-05-2010 at 09:49 AM.
ploks is offline   Reply With Quote
Old 04-05-2010, 04:24 PM   #183
Troll-Brain
User
 
Join Date: Oct 2006
Posts: 1,490

Submissions (1)

Troll-Brain has a spectacular aura about (134)

Default

OnUnitDeindexed is supposed to fire when an unit is removed of the game (by RemoveUnit or end of decay of his corpse), not when an unit is killed.
It will fire closely to his dead only if the unit has no corpse and you have edited decay constants, or explode with or without an ability like finger of death.
__________________
Cool != Useful

Last edited by Troll-Brain : 04-05-2010 at 04:26 PM.
Troll-Brain is offline   Reply With Quote
Old 04-05-2010, 04:41 PM   #184
ploks
User
 
Join Date: Jun 2007
Posts: 99

ploks has little to show at this moment (6)

Default

Thanks for the help, will test that!
ploks is offline   Reply With Quote
Old 04-05-2010, 05:17 PM   #185
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

Quote:
Originally Posted by jk2pach
I have the same kind of problems

I use a lot AutoIndex, but I have some "Blabla is a filtered unit" which appears strangely.

Do you have the SafeMode boolean set to false? Also, send me a map where this is happening.
grim001 is offline   Reply With Quote
Old 04-05-2010, 08:34 PM   #186
jk2pach
User
 
jk2pach's Avatar
 
Join Date: Jan 2009
Posts: 43

jk2pach has little to show at this moment (1)

Default

Mp Sent with the map.

By the way:

When I use UnitUserData, they are no probleme.
When I use Hashtable, there is this probleme sometimes.
__________________
You want to pilot a F22 Raptor in Warcraft III?
Click here to know what I call map credits.
jk2pach is offline   Reply With Quote
Old 09-10-2010, 08:36 PM   #187
Quillraven
User
 
Join Date: Sep 2007
Posts: 40

Quillraven has little to show at this moment (3)

Send a message via ICQ to Quillraven
Default

i wonder,
is it good or bad if autoindex throws the error messages "xe unit is a filtered unit" in debug mode. the comment says that xe dummy units are automatically filtered so why should there be an _error_message for a xe unit?

i dont call getunitid on that unit but when it dies, the errormessage is displayed.
Quillraven is offline   Reply With Quote
Old 10-29-2010, 12:48 PM   #188
Bribe
User
 
Bribe's Avatar
 
Join Date: Mar 2010
Posts: 233

Submissions (1)

Bribe will become famous soon enough (30)Bribe will become famous soon enough (30)

Send a message via AIM to Bribe
Default

Solution: delete it from that line of code in your map if you're running it in debug mode.
Bribe is offline   Reply With Quote
Old 04-12-2011, 12:55 AM   #189
Themerion
Brahms-fan
 
Themerion's Avatar
 
Join Date: Jan 2006
Posts: 642

Submissions (2)

Themerion has a spectacular aura about (114)Themerion has a spectacular aura about (114)Themerion has a spectacular aura about (114)Themerion has a spectacular aura about (114)

Default

AutoIndex doesn't seem to work that well with RemoveUnit...

For me, in the attached testmap AutoIndex fails in about 3 remove/create-cycles (which is about 6 seconds).
Attached Files
File Type: w3x test.w3x (32.4 KB, 15 views)
__________________
Submissions::
(v)JASS Tutorial
Covers how to make fast and safe coding for common tasks in vJASS/JASS.
Creep Respawn System
It has never been easier to respawn creep groups...

Last edited by Themerion : 04-12-2011 at 12:55 AM.
Themerion is offline   Reply With Quote
Old 04-12-2011, 09:43 AM   #190
Bribe
User
 
Bribe's Avatar
 
Join Date: Mar 2010
Posts: 233

Submissions (1)

Bribe will become famous soon enough (30)Bribe will become famous soon enough (30)

Send a message via AIM to Bribe
Default

RemoveUnit caused unspeakable framerate teardown in my map when using AutoIndex. Could be related.
Bribe is offline   Reply With Quote
Old 06-09-2011, 12:21 AM   #191
BBQ
User
 
Join Date: May 2011
Posts: 85

Submissions (2)

BBQ will become famous soon enough (30)BBQ will become famous soon enough (30)

Default

Quote:
Originally Posted by Themerion
AutoIndex doesn't seem to work that well with RemoveUnit...

For me, in the attached testmap AutoIndex fails in about 3 remove/create-cycles (which is about 6 seconds).
That happens only when the UseUnitUserData boolean is set to false (that is how AutoIndex is configured in your map). The issue is caused by GetHandleId(unit) (well, saying by the hashtable as a whole would be more accurate) and will be present in any indexing system that has the capability of using a hashtable instead of user data (AutoIndex is the only one that can do that).

Try enabling the UseUnitUserData boolean and watch as the issue goes away and your case of unit removal is handled properly.

Quote:
Originally Posted by Bribe
RemoveUnit caused unspeakable framerate teardown in my map when using AutoIndex. Could be related.
Yeah, because a simple hook RemoveUnit(unit) that consists of one line (well, after compilation it would be 2-3 lines plus a trigger evaluation, but still ...) can cause massive amounts of lag.

People may prefer using AIDS or UnitIndexer over AutoIndex because of the speed advantage, but I must say that in terms of functionality and neatness (which is exactly what I'm after), AutoIndex beats them all (and I don't even want to talk about UnitIndexer, as it uses "very descriptive" variable names, such as q, l and y in order to get a tiny speed-boost and discourage the use of the map optimizer, which it gets broken by).

Edited by BBQ. Reason: Fixed a few typos.

Last edited by BBQ : 06-09-2011 at 12:45 PM.
BBQ is offline   Reply With Quote
Old 07-17-2011, 05:46 PM   #192
morganxl
User
 
Join Date: Nov 2009
Posts: 7

morganxl has little to show at this moment (0)

Default

I get a syntax error from JassHelper when trying to compile map with AutoIndex library.

Error log says: "JassHelper - Step 2 (structs)", "Compile error", "Syntax error"

Code:
    static method getIndex takes unit u returns integer
        static if AutoIndex___UseUnitUserData then// highlighted line in error browser, original line is "static if UseUnitUserData then "
            return GetUnitUserData(u)
        else
            return LoadInteger(ht, 0, GetHandleId(u))
        endif
    endmethod //Resolves to an inlinable one-liner after the static if.
morganxl is offline   Reply With Quote
Old 07-17-2011, 06:01 PM   #193
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

AutoIndex compiles without a problem for me, are you using the latest JassHelper? The one that comes with the last version of NewGen is insufficient, if that's what you're using then you need to update it.
__________________
Anitarf is offline   Reply With Quote
Old 07-17-2011, 08:26 PM   #194
moyack
Evil Emoticon
 
moyack's Avatar


Respected User
Project Leader: PoC
 
Join Date: Jan 2006
Posts: 3,279

Submissions (17)

moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)

AI Tournament #2 - 2nd PlaceHero Contest - Second place

Send a message via MSN to moyack
Default

Or just use this updated version: http://sc2modding.info/warcraft3/wc3...n-pack-(jngp)/
moyack is offline   Reply With Quote
Old 10-12-2011, 01:45 PM   #195
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

I have discovered that there is a unit event that will run even after the undefend order event when a unit is removed: if the unit has any items, the item drop event will run for each of those items. If the user tries to get the unit id of the triggering unit on that event, they will get the "X is a filtered unit." error message in debug mode. The function still returns the correct unit id but the error message is bothersome.

One solution to this would be to destroy the AutoIndex structs with a 0.0 second delay rather than destroying them immediately after the deindex callbacks are called. Another solution would be to add another exception to the getIndexDebug function: in addition to and GetIssuedOrderId() != 852056, add and GetManipulatedItem() == null. The latter is easier to do, but doesn't address the potential obscure problems that could occur if a new unit was created on such an event, thus getting the id of the old unit and potentially overwriting data belonging to the old unit that the user is still accessing.
__________________

Last edited by Anitarf : 10-12-2011 at 01:49 PM.
Anitarf 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 05:34 AM.


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