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 05-12-2008, 08:03 PM   #931
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


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

Submissions (37)

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

Hero Contest #3 - 2nd Place

Default

I didn't change anything related to that recently, although I think redeclaring a member is only allowed for interfaces and was never introduced to struct childs.

I don't think this is going to change.
__________________
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
Sponsored Links - Login to hide this ad!
Old 05-12-2008, 08:43 PM   #932
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

Thats right, I forgot to declare the variable in the interface.

Anyway its pretty silly that child constructors inherited from parent structs have no way to call child methods or refer to child variables (since it still believes it is of the parent type and vars are initialized to parent values rather than child values until after the constructor is completed)

Because of that, child structs either need to use textmacro constructors or have no constructor at all, which causes you to do something silly like "Child.create().doStuff(parameters)"

It would be really nice if there was any way to fix this.

Last edited by grim001 : 05-12-2008 at 08:44 PM.
grim001 is offline   Reply With Quote
Old 05-16-2008, 03:15 PM   #933
Skater
User
 
Skater's Avatar
 
Join Date: Jan 2007
Posts: 80

Skater is on a distinguished road (17)

Default

Hi.
Vexorian can you make "sg__<name>_get" / "sg__<name>_set" functions constant?
__________________
Skater is offline   Reply With Quote
Old 05-16-2008, 03:43 PM   #934
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


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

Submissions (37)

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

Hero Contest #3 - 2nd Place

Default

why would that be necessary?
__________________
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 05-16-2008, 03:59 PM   #935
Skater
User
 
Skater's Avatar
 
Join Date: Jan 2007
Posts: 80

Skater is on a distinguished road (17)

Default

for something like this:

Collapse JASS:
scope bla
    globals
        private constant integer SIZE=16000
        private integer array AA [SIZE]
    endglobals
    public constant function get_something takes integer d returns integer
        return AA[d]  //cannot call non-constant functions
    endfunction
endscope

i know, that this is not needed, but i think it would be nice
__________________
Skater is offline   Reply With Quote
Old 05-16-2008, 04:07 PM   #936
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


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

Submissions (37)

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

Hero Contest #3 - 2nd Place

Default

Well, in Jass you cannot make a function that returns the contents of an array a constant anyways.
__________________
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 05-16-2008, 04:23 PM   #937
Skater
User
 
Skater's Avatar
 
Join Date: Jan 2007
Posts: 80

Skater is on a distinguished road (17)

Default

Hm, PJass reported no errors so i thought its possible...
__________________
Skater is offline   Reply With Quote
Old 05-17-2008, 12:33 AM   #938
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'm very angry that you made the //! library syntax deprecated and that I now have to go through my maps and change the syntax for over 100 libraries that I use. I just felt like saying that, thanks for listening.
__________________
Rising_Dusk is offline   Reply With Quote
Old 05-17-2008, 12:37 AM   #939
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


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

Submissions (37)

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

Hero Contest #3 - 2nd Place

Default

Didn't that happen like 6 months ago?

Edit: If I released my planned WarCiTy tool, you could have done search and replace on all your custom text triggers in a single pass, sorry for not releasing it earlier...
__________________
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 05-19-2008, 01:17 AM   #940
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)

Default

Erm I have a little problem or request... depends.

Collapse JASS:
library A

globals
    public constant integer SIMPLE_TEST = 'test'
endglobals

endlibrary

library B uses A

globals
    public constant integer TEST = A_SIMPLE_TEST
endglobals

endlibrary

This does not work... sometimes.

So my feeling here is that either ordering of globals is not working correctly or that you did not implement it at the first place.
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar is offline   Reply With Quote
Old 05-19-2008, 02:04 AM   #941
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


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

Submissions (37)

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

Hero Contest #3 - 2nd Place

Default

I think it initially didn't work, and I don't remember if I ever changed that, if I did there should be something about that in the changelog.
__________________
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 05-19-2008, 08:41 AM   #942
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)

Default

It is a request than, make it work.

Especially because you state in jasshelper manual that it is possible to init globals with other globals, witch is of course pointless if there is no ordering.

Did I mention "it is the right way to do it..."
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar is offline   Reply With Quote
Old 05-21-2008, 11:42 PM   #943
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

I have also noticed that you often can't use constant global variables to determine struct instances because of global ordering, which is annoying.
grim001 is offline   Reply With Quote
Old 05-22-2008, 08:59 AM   #944
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)

Default

Well since globals are one of oldest things in jasshelper I am assuming it works by just sweeping through whole map script and shifting global declarations to the beginning. (it behaves like a simple text preprocessor)

Later development of libraries made some higher standards witch global declarations forgot to follow.
I assume this would be moderately hard to implement since library ordering already works ok.

This is definitely one of last mayor features that jasshelper lacks.
It is extremely important for separation of code.
In the current state I have to make redundant declarations of globals when they are needed by more than one trigger (for global constants), or in worst case merge together two libraries that should really be separated (for global variables)

It is strange I did not report this earlier considering the amount of trouble it caused me.

You make this Vex and you can finally call it a 1.0.0.0

PS: did you make extended structs use binary array indexing?
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar is offline   Reply With Quote
Old 05-22-2008, 12:35 PM   #945
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


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

Submissions (37)

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

Hero Contest #3 - 2nd Place

Default

I dunno why you guys are trying to convince me to do it when I implied I will do it in my previous post. I don't think I'll call it 1.0.0.0 yet though.
__________________
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
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:43 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