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 10-30-2009, 01:52 PM   #2851
Lord_Executor
User
 
Join Date: Sep 2009
Posts: 6

Lord_Executor has little to show at this moment (0)

Default

Is there a possibility to overload functions/methods?

Collapse JASS:
     function test takes integer i returns nothing
         call BJDebugMsg(I2S(i))
     endfunction
     function test takes string  s returns nothing overload
         call BJDebugMsg(s)
     endfunction
...
call test(3)
call test("test")
...

Last edited by Lord_Executor : 10-30-2009 at 01:53 PM.
Lord_Executor is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 10-30-2009, 02:02 PM   #2852
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

not yet.
__________________
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 10-30-2009, 06:11 PM   #2853
akolyt0r
In Flames
 
akolyt0r's Avatar
 
Join Date: Jan 2006
Posts: 1,153

Submissions (3)

akolyt0r has a spectacular aura about (120)

Default

Quote:
Originally Posted by Vexorian
not yet.
You will really add this ??
Thats quite a difficult job ...
think of:
Collapse JASS:
function test takes integer i returns nothing
function test takes somestruct o returns nothing
function test takes someotherstruct o returns nothing
__________________
akolyt0r is offline   Reply With Quote
Old 10-30-2009, 06:13 PM   #2854
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

not that, but something like that.
__________________
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 10-31-2009, 12:49 AM   #2855
Frozenhelfire
User
 
Join Date: Apr 2008
Posts: 49

Frozenhelfire has little to show at this moment (0)

Default

Quote:
Originally Posted by Vexorian
updating to one of the most recent versions.

Hmmm, this is not the case for me. Just to make sure, I copy the three files in the executable folder into the jasshelper folder in newgen? That is what I've been doing. I'll see if microsoft will fix it :D
Although if I try opening it directly, it says bin\SFmpq.dll is missing even though it is there. This may be the problem and I'll look at my paths once I get home.

Last edited by Frozenhelfire : 10-31-2009 at 12:55 AM.
Frozenhelfire is offline   Reply With Quote
Old 10-31-2009, 05:11 PM   #2856
Earth-Fury
Two Blue
 
Earth-Fury's Avatar
 
Join Date: Mar 2003
Posts: 2,179

Submissions (7)

Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)Earth-Fury is just really nice (343)

Send a message via MSN to Earth-Fury
Default

JH error: "constant structs not supported"
on the line:
constant ARGB BonusBoard___COLOR_HEADINGS = 0xFFFF00
from the source:
private constant ARGB COLOR_HEADINGS = 0xFFFF00
Step 2 (Structs) is the phase the error happens in.

I'm guessing that's an error. If not, then consider this a feature request...
__________________
Useful Links:
My Resources:
Good Resources:
Search
Tutorials
Ability Guide

UnitMaxState
BonusMod

AutoIndex
ARGB
TimerUtils

Earth-Fury is offline   Reply With Quote
Old 10-31-2009, 05:28 PM   #2857
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

It's a feature request.

allow constant for array structs. Then allow constant for the time you can actually .create in globals.

Since ARGB fails without it, I'll do it in the next version.
__________________
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 10-31-2009, 09:23 PM   #2858
gekko
User
 
gekko's Avatar
 
Join Date: Nov 2007
Posts: 129

Submissions (1)

gekko will become famous soon enough (33)gekko will become famous soon enough (33)

Default

Even with [forcemethodevaluate] in jasshelper.conf, this code compiled without errors:

Collapse JASS:
struct A
    method a takes nothing returns nothing
        call .b()
    endmethod
    
    method b takes nothing returns nothing
        call BJDebugMsg("")
        call BJDebugMsg("")
    endmethod
endstruct

__________________
My stuff can be found at www.eeve.org

Check out latest GMSI !
gekko is offline   Reply With Quote
Old 10-31-2009, 09:30 PM   #2859
Rising_Dusk
Obscurity, the Art


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

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

Yeah, that should work fine. Why wouldn't it?
__________________
Rising_Dusk is offline   Reply With Quote
Old 10-31-2009, 09:45 PM   #2860
XieLong
User
 
XieLong's Avatar
 
Join Date: Mar 2007
Posts: 81

XieLong has little to show at this moment (7)

Default

I think i have another feature request ._.

As there is inheritance of structs why isn't there also the keyword "protected"? I think it's really necessary cause otherwise we would have to declare all variables used by child structs as "public"...
XieLong is offline   Reply With Quote
Old 10-31-2009, 09:54 PM   #2861
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

If something is supposed to be used by code outside the struct, public is precisely the keyword to use.

I have always headed towards avoiding the use of implementation inheritance.
__________________
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 10-31-2009, 10:27 PM   #2862
XieLong
User
 
XieLong's Avatar
 
Join Date: Mar 2007
Posts: 81

XieLong has little to show at this moment (7)

Default

Quote:
Originally Posted by Vexorian
I have always headed towards avoiding the use of implementation inheritance.
Yes, I read this... but why do you offer interfaces and extensible structs if you do not want to aim inheritance? I don't get the point :\

See, when one struct extends another struct, all members of the parent struct are in some way not outside of the child struct, are they?
XieLong is offline   Reply With Quote
Old 10-31-2009, 10:39 PM   #2863
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

interfaces are interface inheritance (not implementation inheritance). Extensible structs were intended as a form of composition.

Anyway, the point of encapsullation is to protect code from outsiders. protected does not do that better than public, it just turns out to be a way to force implementation inheritance which actually breaks encapsulation...
__________________
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 10-31-2009, 11:47 PM   #2864
gekko
User
 
gekko's Avatar
 
Join Date: Nov 2007
Posts: 129

Submissions (1)

gekko will become famous soon enough (33)gekko will become famous soon enough (33)

Default

Quote:
Originally Posted by Rising_Dusk
Yeah, that should work fine. Why wouldn't it?

because I called a method before defining it which I guess would compile to an implicit evaluate which should be disabled with the setting in jasshelper.conf. So bug or me == fail?
__________________
My stuff can be found at www.eeve.org

Check out latest GMSI !
gekko is offline   Reply With Quote
Old 11-01-2009, 12:01 AM   #2865
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

Yes it's a bug. It compiles to using TriggerEvaluate()

><
Bobo_The_Kodo is offline   Reply With Quote
Old 11-01-2009, 12:01 AM
Bobo_The_Kodo
This message has been deleted by Bobo_The_Kodo.
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 09:28 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