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-04-2009, 02:36 PM   #2191
Master_of_Ra
User
 
Join Date: Mar 2009
Posts: 10

Master_of_Ra has little to show at this moment (0)

Default

I think that block comments should still color the text inside them green, like normal comments

Collapse JASS:
// will be green

/* is not green atm in the editer,
   but should be */

Last edited by Master_of_Ra : 08-04-2009 at 02:36 PM.
Master_of_Ra is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 08-04-2009, 03:08 PM   #2192
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

That editer is not part of jasshelper, so try finding out who made the syntax highlighter you are using so he can update it.

Quote:
#define Thunder 0x000000F6
I don't want exactly what you want to do with this, you say it would help hashtables, how so? Where exactly would a define help hashtables much more than an integer constant?


Vestras' sample of how much adding defines to jasshelper would allow people to do very lame things is discouraging me greatly from ever adding defines...

Quote:
Does getType only work for interfaces so how do I call stub methods from parent structs?
It doesn't seem to be called automatically.
super?
__________________
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-04-2009, 10:00 PM   #2193
Barade
User
 
Barade's Avatar
 
Join Date: May 2006
Posts: 164

Barade is on a distinguished road (14)

Default

Quote:
Originally Posted by Vexorian
super?
I was talking about calling the stub method of a child struct by using its parent struct and without knowing the child struct type (conversion or is there any possibility to get it as I've already asked?). How do I get this done with super? Thought super exists to call the stub method of the parent struct from child struct instances.
Collapse JASS:
struct ParentStruct
        public stub method myMethod takes nothing returns nothing
        endmethod
endstruct

struct ChildStruct extends ParentStruct
        public stub method myMethod takes nothing returns nothing
        endmethod
endstruct

function Test takes nothing returns nothing
        local ParentStruct test = ChildStruct.create()
        call test.myMethod() // want to call child struct's method
endfunction
And yes, I know that this is a stupid example of code but I need it when I use some kind of abstract struct types.
__________________

Last edited by Barade : 08-04-2009 at 10:04 PM.
Barade is offline   Reply With Quote
Old 08-05-2009, 06:53 AM
gekko
This message has been deleted by gekko. Reason: my own dumbness...
Old 08-05-2009, 03:04 PM   #2194
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 Master_of_Ra
I think that block comments should still color the text inside them green, like normal comments

Collapse JASS:
// will be green

/* is not green atm in the editer,
   but should be */

Wrong Thread Sweety :)
This is the right one :)

Greez
Seshiro is offline   Reply With Quote
Old 08-05-2009, 03:47 PM   #2195
BlinkBoy
User
 
BlinkBoy's Avatar


Respected User
 
Join Date: Dec 2003
Posts: 835

Submissions (4)

BlinkBoy has a spectacular aura about (97)BlinkBoy has a spectacular aura about (97)BlinkBoy has a spectacular aura about (97)BlinkBoy has a spectacular aura about (97)

Outstanding Tutorial

Default

Quote:
Originally Posted by Vexorian
That editer is not part of jasshelper, so try finding out who made the syntax highlighter you are using so he can update it.

I don't want exactly what you want to do with this, you say it would help hashtables, how so? Where exactly would a define help hashtables much more than an integer constant?


Vestras' sample of how much adding defines to jasshelper would allow people to do very lame things is discouraging me greatly from ever adding defines...


super?

xD indeed, Vestras example is very descouraging.

well I would use defines to make my child keys more readable without declaring constants.

For instance, I use hex to classify my keys. The first byte block defines if the key is part of a system, hero or library, the second defines the id of the hero, system or library, the 3rd defines an ability and 4th is the id related to data.

However, in my code I wouldn't like having things like this:
Collapse JASS:
local unit a = GetUnit(f,0x00002002)
local real damage = GetReal(f,0x00002003)
local real time =  GetReal(f,0x00002004) - 1.0
local effect e = GetEffect(f,0x00002005)
It's very unreadable unless you know what each value means

here is how it would read better:
Collapse JASS:
private define DAMAGE 0x00002003
private define TARGET 0x00002002
private define TIME 0x00002004
private define SFX 0x00002005
.....
local integer f = GetHandleId(u)
local unit a = GetUnit(f,TARGET)
local real damage = GetReal(f,DAMAGE)
local real time =  GetReal(f,TIME) - 1.0
local effect e = GetEffect(f,SFX)

and this way I'm not consuming more memory by declaring millions of constants.

You should make defines only be able to take a single value that be either a boolean, a float, an integer or an string to avoid things like Vestra proposed.

Other good sample:
Collapse JASS:
define ccRED "|cFFFF0000"
define ccEND "|r"
......

local string mycoloredstring = ccRED + "Tis my string!" + ccEND
__________________
Tools:
NeoDex - a Gmax and 3ds Max modeling Toolset for Wc3!

Learn to animate! check out my: Basic Animation Tutorial!

Currently working at a sequel to my animation tutorial.

Last edited by BlinkBoy : 08-05-2009 at 03:54 PM.
BlinkBoy is offline   Reply With Quote
Old 08-05-2009, 04:03 PM   #2196
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

what's wrong about the key keyword?
__________________
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-05-2009, 04:38 PM   #2197
BlinkBoy
User
 
BlinkBoy's Avatar


Respected User
 
Join Date: Dec 2003
Posts: 835

Submissions (4)

BlinkBoy has a spectacular aura about (97)BlinkBoy has a spectacular aura about (97)BlinkBoy has a spectacular aura about (97)BlinkBoy has a spectacular aura about (97)

Outstanding Tutorial

Default

Quote:
Originally Posted by Vexorian
what's wrong about the key keyword?

I've tried using it like this:

Collapse JASS:
private keyword DATA = 0x0201200
//and like this
private keyword DATA 0x0201200

but it doesn't look like it actually replaces in like if it would be a macro. I read the documentation and it's used to save an object name before it's declaration, like a function. Could you explain the relationship, if it wouldn't be a problem ofcourse.
__________________
Tools:
NeoDex - a Gmax and 3ds Max modeling Toolset for Wc3!

Learn to animate! check out my: Basic Animation Tutorial!

Currently working at a sequel to my animation tutorial.
BlinkBoy is offline   Reply With Quote
Old 08-05-2009, 06:16 PM   #2198
Element of Water
User
 
Element of Water's Avatar
 
Join Date: Mar 2009
Posts: 147

Submissions (2)

Element of Water is on a distinguished road (18)

Default

the "keyword" keyword is used to make it possible to declare a global variable of a private struct. EG:

Collapse JASS:
library Test

globals
    private Data d //syntax error
endglobals

private struct Data
endstruct

endlibrary
Collapse JASS:
library Test

private keyword Data

globals
    private Data d //no syntax error
endglobals

private struct Data
endstruct

endlibrary
Element of Water is offline   Reply With Quote
Old 08-05-2009, 07:24 PM   #2199
Dark_Dragon
User
 
Dark_Dragon's Avatar
 
Join Date: Apr 2008
Posts: 191

Dark_Dragon has little to show at this moment (9)

Default

Quote:
Originally Posted by BlinkBoy
I've tried using it like this:

Collapse JASS:
private keyword DATA = 0x0201200
//and like this
private keyword DATA 0x0201200

but it doesn't look like it actually replaces in like if it would be a macro. I read the documentation and it's used to save an object name before it's declaration, like a function. Could you explain the relationship, if it wouldn't be a problem ofcourse.

i am sry but u dont understand! he (vex) means key "keyword" not keyword keyword!

Collapse JASS:
globals
     private key DAMAGE
     private key SFX
endglobals

...
local integer f = GetHandleId(u)
local real damage = GetReal(f,DAMAGE)
local effect e = GetEffect(f,SFX)
...

thats what i mean or thats what vex means "its all the same"

Quote:
Originally Posted by Barade
I was talking about calling the stub method of a child struct by using its parent struct and without knowing the child struct type (conversion or is there any possibility to get it as I've already asked?). How do I get this done with super? Thought super exists to call the stub method of the parent struct from child struct instances.
Collapse JASS:
struct ParentStruct
        public stub method myMethod takes nothing returns nothing
        endmethod
endstruct

struct ChildStruct extends ParentStruct
        public stub method myMethod takes nothing returns nothing
        endmethod
endstruct

function Test takes nothing returns nothing
        local ParentStruct test = ChildStruct.create()
        call test.myMethod() // want to call child struct's method
endfunction
And yes, I know that this is a stupid example of code but I need it when I use some kind of abstract struct types.

k to give u the answer now!

its actually wrongly typed (wrong syntax i mean), coz when structs extends this does not mean u can actually create it from child!

Collapse JASS:
struct ChildStruct
        static method create takes integer test returns thistype
            return thistype.allocate()
        endmethod
        
        public stub method myMethod takes nothing returns nothing
        endmethod
endstruct

struct ParentStruct extends ChildStruct
        static method create takes integer test returns thistype
            return thistype.allocate(test)
        endmethod
        
        public method myMethod takes nothing returns nothing
            call super.myMethod()
            ...
        endmethod
endstruct

function Test takes nothing returns nothing
        local ParentStruct test = ParentStruct.create(100)
        call test.myMethod() // calls parent method and it calls child ones as well
        // ~via super pointer...
endfunction


i hope it helps and greets!
~Dark Dragon
__________________
Undefined shadow...

Last edited by Dark_Dragon : 08-05-2009 at 07:28 PM.
Dark_Dragon is offline   Reply With Quote
Old 08-05-2009, 07:25 PM   #2200
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:
Originally Posted by BlinkBoy
I've tried using it like this:

Collapse JASS:
private keyword DATA = 0x0201200
//and like this
private keyword DATA 0x0201200

but it doesn't look like it actually replaces in like if it would be a macro. I read the documentation and it's used to save an object name before it's declaration, like a function. Could you explain the relationship, if it wouldn't be a problem ofcourse.
The key keyword

If all you want is inlining, use constant integer as it is the right thing to do, and the map optimizer will inline 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-06-2009, 08:57 AM   #2201
Vestras
User


Project Member: LoC
 
Join Date: Dec 2007
Posts: 756

Submissions (4)

Vestras will become famous soon enough (40)Vestras will become famous soon enough (40)

Default

Hmmz? What was wrong with I posted?
Vestras is offline   Reply With Quote
Old 08-06-2009, 02:17 PM   #2202
Alevice
It feels good
 
Alevice's Avatar
 
Join Date: Mar 2006
Posts: 1,305

Alevice is a jewel in the rough (190)Alevice is a jewel in the rough (190)Alevice is a jewel in the rough (190)

Default

It's ugly and contrived as fuck.
__________________
_-|-_

Alevice.jones is SC2 Beta, losers.

Check out my never updated deviantart gallery!!

Kalimdor Raiders (Race Contest #1) Pastebin Page
Cavern Crawlers (Race Contest #2) Pastebin Page
Airship Race Motherfuckers!
Quote:
Originally Posted by http://ajaxian.com/archives/would-you-like-a-_-with-that-new-library-gives-js-what-it-should-have#comment-276203
- Dont solve problems that dont exist.
- Improve the wheel, dont reinvent it.
- Port the wheel if it doesnt exist in your environment.
- Integrate the wheel into your project.
- Make sure you can replace your wooden wheel for a rubber one if someone else invents it.
Alevice is offline   Reply With Quote
Old 08-06-2009, 02:24 PM   #2203
Dark_Dragon
User
 
Dark_Dragon's Avatar
 
Join Date: Apr 2008
Posts: 191

Dark_Dragon has little to show at this moment (9)

Default

Quote:
Originally Posted by Vestras
Hmmz? What was wrong with I posted?

its very wrong coz cjass has exactlly that syntax and vex dont like that syntax... coz of this he does not want to implement defines. so if u want that syntax just use cjass omg! dont say that to vex coz he likes jass and jass is not like c++.

lol how much more of people will ask things that are already in cjass and the ones vex said will not implement?

anyway i hope jasshelper gets some update like this new better structs and so on...

offtopic!

lol Alevice! whenever i see u i remember of my fav game Half-Life 2 coz this guy looks like Dr. Gordon Freeman
__________________
Undefined shadow...

Last edited by Dark_Dragon : 08-06-2009 at 02:26 PM.
Dark_Dragon is offline   Reply With Quote
Old 08-06-2009, 10:45 PM   #2204
daPanda
User
 
Join Date: Jan 2009
Posts: 28

daPanda has little to show at this moment (0)

Default

Quote:
Originally Posted by Dark_Dragon
so if u want that syntax just use cjass omg!
Where do you find cjass? I googled it, but found nothing. Just curious.
daPanda is offline   Reply With Quote
Old 08-06-2009, 11:02 PM   #2205
Skater
User
 
Skater's Avatar
 
Join Date: Jan 2007
Posts: 80

Skater is on a distinguished road (17)

Default

http://cjass.xgm.ru
Hidden information:
personally i dont use it, but meh, use it if you want...
__________________

Last edited by Skater : 08-06-2009 at 11:08 PM.
Skater 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:21 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