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 03-05-2008, 04:17 AM   #781
Jazradel
Superuser
 
Jazradel's Avatar
 
Join Date: Dec 2005
Posts: 651

Submissions (1)

Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)

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

I would like a keyword that allows me to implement a library in mine, so I have access to its private functions and public functions without needing a prefix.

Something like:
Quote:
library CoreSystem
private function f //...
endlibrary

library CoreExtension implements CoreSystem
//...
call f
//...
endfunction
endlibrary
It would just allow me neaten up/modularize several things.

Also on top of my wish list for initializers for scopes so they're not tied to trigger names anymore. public function InitTrig... is very lame.

I'd also like For(i to n) and For(unit in group) syntax.

Also on my wish list is function syntax more like java/c++, local declaration freedom, optional endline and merge line syntax, no need for set/call and the ability to go u.GetX() instead of GetUnitX(). But the chance of you implementing most of those is about zero.
__________________


Table:
Jump Map
Point System
Warcraft III Model Archive

W3 Model Archive should be available from https://www.mediafire.com/folder/cd5..._III_Resources, PM me if it doesn't work.

Last edited by Jazradel : 03-05-2008 at 06:38 AM.
Jazradel is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 03-05-2008, 11:00 AM   #782
DiscipleOfLife
User
 
Join Date: Jan 2008
Posts: 29

DiscipleOfLife has little to show at this moment (0)

Default

I found a bug in 0.9.9.7 (havent tried with 0.9.9.8).
I have an empty map with nothing in it except for this:
Collapse JASS:
struct a
    // doesnt matter what is here
endstruct

struct b extends a
    // doesnt matter what is here either
endstruct

I get an "undeclared variable f__arg_this" error in function sc__a_destroy, and infact there is no f__arg_this variable in the globals block:
Collapse JASS:
globals
    // Generated
    trigger                 gg_trg_Buggy               = null


//JASSHelper struct globals:
constant integer si__a=1
integer si__a_F=0
integer si__a_I=0
integer array si__a_V
constant integer si__b=2
integer array si__a_type
trigger array st__a_onDestroy

endglobals

//Generated allocator of a
function s__a__allocate takes nothing returns integer
 local integer this=si__a_F
    if (this!=0) then
        set si__a_F=si__a_V[this]
    else
        set si__a_I=si__a_I+1
        set this=si__a_I
    endif
    if (this>8190) then
        return 0
    endif

    set si__a_V[this]=-1
 return this
endfunction

//Generated destructor of a
function sc__a_destroy takes integer this returns nothing
    if this==null then
        return
    elseif (si__a_V[this]!=-1) then
        return
    endif
    set f__arg_this=this
    call TriggerEvaluate(st__a_onDestroy[si__a_type[this]])
    set si__a_V[this]=si__a_F
    set si__a_F=this
endfunction

//Generated allocator of b
function s__b__allocate takes nothing returns integer
 local integer this=s__a__allocate()
 local integer kthis
    if(this==0) then
        return 0
    endif
    set si__a_type[this]=2
    set kthis=this

 return this
endfunction


//===========================================================================
// 
// Just another Warcraft III map
//...
The problem goes away if struct b is commented out or if there is a third struct in the map which has an onDestroy method, or if struct a has an onDestroy method.


I also have a suggestion: ability to declare globals like this anywhere: global integer example = 2. When I say anywhere I mean in functions also. Maybe they could also have private and public keywords - as in relation to the functions they are in.

I have a more useful suggestion too: ability to initialize boolexprs in global blocks like this:
Collapse JASS:
globals
    boolexpr myExpr = initializeboolexpr(function SomeFunctionAnywhereInTheMapScript)
endglobals
What it would do is just call Filter(function ...) in some initialization trigger and ofc before that move the desired function above that Filter() call.
DiscipleOfLife is offline   Reply With Quote
Old 03-05-2008, 12:38 PM   #783
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

Quote:
so I have access to its private functions and public functions without needing a prefix.
That's hard right now, perhaps with the next compilrer, if it happens though I would not allow private usage.

Quote:
I'd also like For(i to n) and For(unit in group) syntax.
definitely not For, but for, and I will not ever implement for(unit in group) since it would be like promoting the usage of unit groups.


Quote:
Also on top of my wish list for initializers for scopes so they're not tied to trigger names anymore. public function InitTrig... is very lame.

Use a library. Next version I am going to add requires * or something like that to libraries.
__________________
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 03-05-2008, 12:41 PM   #784
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

Quote:
Also on my wish list is function syntax more like java/c++, local declaration freedom, optional endline and merge line syntax, no need for set/call and the ability to go u.GetX() instead of GetUnitX(). But the chance of you implementing most of those is about zero.
Declaration freedom is uninmplementable in Jass. optional endline maybe, I would like to once implement wrapper stuff to handles, and it would be u.x instead of u.GetX.

Quote:
I also have a suggestion: ability to declare globals like this anywhere:
I like scopes as a solution for this.
__________________
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 03-06-2008, 04:29 AM   #785
Jazradel
Superuser
 
Jazradel's Avatar
 
Join Date: Dec 2005
Posts: 651

Submissions (1)

Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)

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

I was just capitalizing for to make it stand out. Fair enough about the for(unit in group) thing.

Quote:
Next version I am going to add requires * or something like that to libraries.
I don't get this.

Using a library is a pain because of all the other libraries I'm using. It means each needs a giant list of requirements. Unless I have a special library whose only purpose is to require other stuff ... which I might actually do. It's still lame.

How is declaration freedom unimplementable? Just place it at the top of the trigger, and change the declaration to a set. Maybe you misunderstood what I meant, I just want my triggers to be slightly neater.

Like the sound of the u.x stuff, much better than u.GetX
__________________


Table:
Jump Map
Point System
Warcraft III Model Archive

W3 Model Archive should be available from https://www.mediafire.com/folder/cd5..._III_Resources, PM me if it doesn't work.
Jazradel is offline   Reply With Quote
Old 03-06-2008, 11:00 PM   #786
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

Quote:
Using a library is a pain because of all the other libraries I'm using
That's what requires * would do.


Quote:
How is declaration freedom unimplementable? Just place it at the top of the trigger, and change the declaration to a set.
That would be totally pointless and not declaration freedom.
__________________
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 03-07-2008, 05:22 AM   #787
Jazradel
Superuser
 
Jazradel's Avatar
 
Join Date: Dec 2005
Posts: 651

Submissions (1)

Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)

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

So requires * would make it require all other libraries (be placed at the bottom in other words)?

local declaration maybe mostly pointless, but it would neaten up my code and make my life a tiny bit easier..

With the u.x stuff, will it be u.x() or u.x? It might not be clear to people they are actually calling a function without the ().
__________________


Table:
Jump Map
Point System
Warcraft III Model Archive

W3 Model Archive should be available from https://www.mediafire.com/folder/cd5..._III_Resources, PM me if it doesn't work.
Jazradel is offline   Reply With Quote
Old 03-07-2008, 01:47 PM   #788
Strilanc
User
 
Strilanc's Avatar
 
Join Date: Jun 2007
Posts: 917

Submissions (4)

Strilanc has a spectacular aura about (131)

2008 Spell olympics - Fire - Gold

Default

A quick request: one-line if statements. I'm tired of needing 3 lines for simple checks.

Collapse JASS:
if conditions then action
translates to
Collapse JASS:
if conditions then
   action
endif
__________________
Don't pay attention to this signature, it's self-contradictory.
Strilanc is offline   Reply With Quote
Old 03-07-2008, 02:37 PM   #789
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

Quote:
With the u.x stuff, will it be u.x() or u.x? It might not be clear to people they are actually calling a function without the ().

set u.x = 2.3
becomes call SetUnitX(u,2.3)
call BJDebugMsg(R2S(u.x))
becomes call BJDebugMsg(R2S(GetUnitX(u) ))
__________________
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 03-08-2008, 12:06 AM   #790
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

How about a copy constructor?
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar is offline   Reply With Quote
Old 03-08-2008, 06:59 AM   #791
Jazradel
Superuser
 
Jazradel's Avatar
 
Join Date: Dec 2005
Posts: 651

Submissions (1)

Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)Jazradel has a spectacular aura about (110)

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

IMO it should be u.x() to differentiate between methods/data.
__________________


Table:
Jump Map
Point System
Warcraft III Model Archive

W3 Model Archive should be available from https://www.mediafire.com/folder/cd5..._III_Resources, PM me if it doesn't work.
Jazradel is offline   Reply With Quote
Old 03-08-2008, 10:03 AM   #792
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

unit's x is data.

I don't really have time to make the wrapper library myself, I will just leave the ability to make that stuff, let someone else decide that stuff.
__________________
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 03-11-2008, 02:25 PM   #793
DiscipleOfLife
User
 
Join Date: Jan 2008
Posts: 29

DiscipleOfLife has little to show at this moment (0)

Default

Suggestion: function interface_once
This would naturally have the same effect for function interfaces as library_once has for libraries.

EDIT: ...as long as all function interface_onces with the same name are identical. In other words:
Collapse JASS:
function interface_once actionfunc takes nothing returns nothing
//...
function interface_once actionfunc takes nothing returns nothing // Works
but on the other hand:
Collapse JASS:
function interface_once actionfunc takes nothing returns nothing
//...
function interface_once actionfunc takes unit u returns nothing // Makes the compiler sad :(

Last edited by DiscipleOfLife : 03-12-2008 at 02:50 PM.
DiscipleOfLife is offline   Reply With Quote
Old 03-11-2008, 05:43 PM   #794
SoulReaping
User
 
Join Date: Jan 2008
Posts: 3

SoulReaping has little to show at this moment (0)

Default

Suggestion:
Adding if statement to textmacro.
Example:
Collapse JASS:
library SomeLibrary
//! textmacro ATextMacro takes ARG1, ARG2
//! if not ARG1 == "hello" then
function $ARG1$ takes $ARG2$ a returns nothing
//....
endfunction
//! else
function KKK takes $ARG2$ $ARG1$ returns nothing
//...
endfunction
//! endif
//! endtextmacro

//! runtextmacro ATextMacro("hello", "integer")
//! runtextmacro ATextMacro("tralala", "boolean")

I'm sure it will be useful if implemented for some systems I know.
SoulReaping is offline   Reply With Quote
Old 03-12-2008, 04:36 PM   #795
Strilanc
User
 
Strilanc's Avatar
 
Join Date: Jun 2007
Posts: 917

Submissions (4)

Strilanc has a spectacular aura about (131)

2008 Spell olympics - Fire - Gold

Default

A small bug with how destroy is handled:

Destroy is always, always placed above the onDestroy method, meaning the 'TriggerEvaluate' calling convention is used when onDestroy is called. Not a huge problem, but it does slow down destroy calls a lot.

onDestroy is almost never called by other struct code, so placing it above destroy makes more sense.
__________________
Don't pay attention to this signature, it's self-contradictory.

Last edited by Strilanc : 03-12-2008 at 04:38 PM.
Strilanc 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:18 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