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 > Warcraft III Modding > Developer's Corner > Warcraft Editing Tools
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 08-17-2009, 10:34 AM   #2281
C2H3NaO2
User
 
Join Date: May 2008
Posts: 80

C2H3NaO2 is on a distinguished road (17)

Default

Ok I fixed the issue with jasshelper running twice by remove the following line from my map:
Collapse JASS:
//! external ObjectMerger w3a Adef lvdt anam "Leave Detect" aart "" arac 0 aite 0

It is totally crazy.

So if anyone has the same problem: run it with objectmerger activ, click away jasshelper warning and close we. Restart we and remove the objecteditor stuff, that now should be applied-.-
C2H3NaO2 is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 08-17-2009, 01:15 PM   #2282
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

I see, well, it actually makes sense, I'll try to fix it later.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 08-18-2009, 07:11 PM   #2283
Anitarf
Procrastination Incarnate


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

Submissions (19)

Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)

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

Default

A question about the exists method.

First of all, the example in the documentation needs "defaults nothing" for it's interface methods or it won't even compile.

Okay, now the real question:
If I have structs extending structs which in turn extend an interface, and I call .exists in the parent struct's create method (which is the child's allocate method) and the parent struct doesn't have an interface method declared, but the child struct does, what will .exist return?
__________________
Anitarf is offline   Reply With Quote
Old 08-19-2009, 04:07 PM   #2284
Eleandor
User
 
Join Date: Jan 2006
Posts: 118

Eleandor is on a distinguished road (12)

Default

Don't know if it was requested already, but Modules need onInit, onCreate and onDestroy ...
Eleandor is offline   Reply With Quote
Old 08-19-2009, 04:27 PM   #2285
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

Quote:
Originally Posted by Anitarf
A question about the exists method.

First of all, the example in the documentation needs "defaults nothing" for it's interface methods or it won't even compile.

Okay, now the real question:
If I have structs extending structs which in turn extend an interface, and I call .exists in the parent struct's create method (which is the child's allocate method) and the parent struct doesn't have an interface method declared, but the child struct does, what will .exist return?
hopefully true.

In practice, it could actually not compile at all.

Things like onInit, onCreate and onDestroy for modules shall come later.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 08-20-2009, 12:15 PM   #2286
Seshiro
User
 
Seshiro's Avatar
 
Join Date: Aug 2008
Posts: 158

Submissions (1)

Seshiro is on a distinguished road (20)

Default Strange Bug!

Hey Vex,

I've found a strange bug with interfaces and extending ...
So, I have a struct which extends another struct which extends an interface.
In The child-child i want to use a method of the child, but then i become an error, that the method is not declared in the parent-interface.
I've tried to reproduce the whole thing, but only does not work with exactly the one method ... with others, it does work.

So, here is the code:
Collapse Errorcode:
scope SonichRush initializer init
    globals
        private constant integer SPELL_ID = '0000'
        private constant real SPEED = 400.
        
        
    endglobals
    private struct data extends Projectile
        
        static method create takes nothing returns data
            local unit c = GetTriggerUnit()
            local unit t = GetSpellTargetUnit()
            local thistype this = .ToUnit(c,t,SPEED,0)
            // Error: ToUnit is not a member of IProjectile
            return this
        endmethod
    endstruct
    
    private function init takes nothing returns nothing
        local trigger t = CreateTrigger()
        
    endfunction
endscope

ToUnit is in line: 282
ByAngle, which works fine is in line: 218
Expand The Projectile Struct:

I hope, this code is able to help you, and me ... :) because it is really important for me ... :)

Greez
Seshiro is offline   Reply With Quote
Old 08-20-2009, 12:23 PM   #2287
Eleandor
User
 
Join Date: Jan 2006
Posts: 118

Eleandor is on a distinguished road (12)

Default

It's not a bug. Projectile.ToUnit is a static method.

If you write .ToUnit(c,t,SPEED,0) inside struct data then it is attempting to call data.ToUnit(...) which does not exist.
Eleandor is offline   Reply With Quote
Old 08-20-2009, 01:12 PM   #2288
Seshiro
User
 
Seshiro's Avatar
 
Join Date: Aug 2008
Posts: 158

Submissions (1)

Seshiro is on a distinguished road (20)

Default

Projectile.ToUnit neither works, I've alredy tried ...

And, I know, that it will work, because data ihnerits .ToUnit from Projectile :) so it'll work, and in other structs it works too with other functions but only not with ToUnit ...

Last edited by Seshiro : 08-20-2009 at 01:18 PM.
Seshiro is offline   Reply With Quote
Old 08-21-2009, 02:10 AM   #2289
Anitarf
Procrastination Incarnate


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

Submissions (19)

Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)

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

Default

Maybe the problem is the fact that you also have a function with the same name declared?
__________________
Anitarf is offline   Reply With Quote
Old 08-21-2009, 03:17 PM   #2290
Dark_Dragon
User
 
Dark_Dragon's Avatar
 
Join Date: Apr 2008
Posts: 189

Dark_Dragon has little to show at this moment (9)

Default

Collapse JASS:
function leak takes unit u returns nothing
endfunction

function test takes nothing returns nothing
    call leak.evaluate(GetTriggerUnit())
endfunction

you know what i mean... i was wondering why my handle id raises and realized that arguments do leak... its logical but now to late for me... now i would need (not only me ofc) to find whenever i used .evaluate, .execute or function objects... and null arguments in it!

thats why it would be nice if you null handle arguments before every return! actually its a variable set but u know what i mean!
__________________
Undefined shadow...
Dark_Dragon is offline   Reply With Quote
Old 08-21-2009, 03:41 PM   #2291
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,905

Submissions (37)

Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)Vexorian has a reputation beyond repute (1060)

Hero Contest #3 - 2nd Place

Default

err, maybe you are not considering that the handle id count raises just once?

Edit: Now that I think of it, arguments inside things evaluated leak because they are converted to locals. now that I parse common.j it should be easy to add something that sets them to null before every return, ok I'll do it.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 08-21-2009, 04:07 PM   #2292
Seshiro
User
 
Seshiro's Avatar
 
Join Date: Aug 2008
Posts: 158

Submissions (1)

Seshiro is on a distinguished road (20)

Default

Quote:
Originally Posted by Anitarf
Maybe the problem is the fact that you also have a function with the same name declared?

I've used the method before, but only in this case it doesnt work ...
Seshiro is offline   Reply With Quote
Old 08-21-2009, 05:46 PM   #2293
Dark_Dragon
User
 
Dark_Dragon's Avatar
 
Join Date: Apr 2008
Posts: 189

Dark_Dragon has little to show at this moment (9)

Default

Quote:
Originally Posted by Vexorian
err, maybe you are not considering that the handle id count raises just once?

Edit: Now that I think of it, arguments inside things evaluated leak because they are converted to locals. now that I parse common.j it should be easy to add something that sets them to null before every return, ok I'll do it.

thanks will be a great help!
__________________
Undefined shadow...
Dark_Dragon is offline   Reply With Quote
Old 08-21-2009, 08:40 PM   #2294
Seshiro
User
 
Seshiro's Avatar
 
Join Date: Aug 2008
Posts: 158

Submissions (1)

Seshiro is on a distinguished road (20)

Default

Vex, it'd be nice, if you would not ignore my posts even if you would say, that you dunno what to do ... but i dunno, if you noticed me ...

Greez
Seshiro is offline   Reply With Quote
Old 08-22-2009, 12:04 AM   #2295
Bobo_The_Kodo
oO
 
Bobo_The_Kodo's Avatar
 
Join Date: Jul 2008
Posts: 580

Bobo_The_Kodo has a spectacular aura about (109)Bobo_The_Kodo has a spectacular aura about (109)Bobo_The_Kodo has a spectacular aura about (109)Bobo_The_Kodo has a spectacular aura about (109)

Default

Quote:
Collapse JASS:
        //Units with "'Avul' - Invulnerable" are considered invulnerable
        method isInvulnerable takes nothing returns boolean
            return GetUnitAbilityLevel( .u, 'Avul' ) > 0
        endmethod
        
        //Units with "'ACmi' - Spell Immunity" are considered spell immune
        method isSpellImmune takes nothing returns boolean
            return GetUnitAbilityLevel( .u, 'ACmi' ) > 0 or .isInvulnerable()
        endmethod
isSpellImmune doesnt inline properly:

Collapse JASS:
    return u.isEnemy(GetSpellEvent().getCaster()) and not u.isSpellImmune() and u.isAlive()

becomes

Collapse JASS:
    return (IsUnitEnemy(s__Unit_u[(u)] , (s__User_p[((GetPlayerId(GetOwningPlayer(s__Unit_u[(((GetUnitUserData((s__SpellEvent_CastingUnit[((s__SpellEvent_current))])))))]))))]))) and not s__Unit_isSpellImmune(u) and (not IsUnitType(s__Unit_u[(u)] , UNIT_TYPE_DEAD)) // INLINED!!

and

Collapse JASS:
        method isSpellImmune takes nothing returns boolean
            return GetUnitAbilityLevel( .u, 'ACmi' ) > 0 or .isInvulnerable()
        endmethod

becomes

Collapse JASS:
        function s__Unit_isSpellImmune takes integer this returns boolean
            return GetUnitAbilityLevel(s__Unit_u[this] , 'ACmi') > 0 or (GetUnitAbilityLevel(s__Unit_u[(this)] , 'Avul') > 0) // INLINED!!
        endfunction
Bobo_The_Kodo 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 01:37 PM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

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