Oh... to Aero, I see that you're talking about vJass (structs and libraries). Can you tell me what that is? I have no clue what are the advantages of it or how to use it (I know, I only use JNGP for Grimoire and JassHelper..)
Also, is it possible to have a Jass syntax highlighter implemented in the World Editor, because I'm sort of getting tired of JassCraft - WE - JassCraft - WE...
Jass pros and hackers, tell me what you make of this.....
Moderator: Cheaters
-
- Senior Member
- Posts: 101
- Joined: June 1st, 2007, 9:05 pm
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
Re: Jass pros and hackers, tell me what you make of this.....
I wish there was a jass syntax highlighter in WE. Maybe in the next release? =3HINDYhat wrote:Also, is it possible to have a Jass syntax highlighter implemented in the World Editor, because I'm sort of getting tired of JassCraft - WE - JassCraft - WE...
Anyways, a struct lets you simlulate a custom type but has a strict syntax. I'll explain using a location. A location is a point (a handle) that contains an x-coordinate and a y-coordinate. So, it would look like this as a struct.
(You can store as many and whatever types of variables you want)struct point
real x (The name of a real variable in the struct)
real y (The name of a real variable in the struct)
endstruct
To use it, I would use the following format.
Basically, what I can do is create a "table" and store data in it. Up until quite recently, almost everyone used "handle vars" and stored local variables in gamecache and "attached" them to a timer or a trigger. Unfortunately, for every variable you stored you have to store/retrieve it using GetStored, Store...ect. Gamecache is slow to run as is doing this. You can probably imagine the lag having to store/retrieve data using I2S(H2I(handle)) and retrieval processes every 0.03 seconds. Anyways, if I use a struct, I can just pass the "table" to the timer or trigger and use the <structname>.variable name syntax to pull the data from it. This method is significantly faster and can allow for like 4x more instances of the spell with less lag than 1x with gamecache. There's also less cleanup and set vars=null, however, locations and effects still need to be destroyed, but not nulled (call DestroyEffect(structname.effectvariable) ).function structtest takes nothing returns nothing
local real r=5
local point p=point.create() (This is the same idea as CreateGroup() )
set p.x=5 (Sets the variable x of "p" to 5)
set p.y=10 (Sets the variable y of "p" to 10)
call DisplayTextToPlayer(GetLocalPlayer(),0,0,R2S(p.x + p.y + r)) (This would display "20")
call point.destroy()
endfunction
Libraries and other stuff are just small goodies. There's a long readme in the jassnewgen folder that explains all these things.
-
- Senior Member
- Posts: 101
- Joined: June 1st, 2007, 9:05 pm
Re: Jass pros and hackers, tell me what you make of this.....
Oh I had no idea about the readme. I'll check it up. Sounds very useful!
Tables come from Vexorian's CSCache though... right? Anyway, I'll read up.
Also, I found something that might be a WE syntax highlighter, just now.
http://www.thehelper.net/forums/showthr ... ght=syntax
I tried it out and it didn't work. Can you try it? If it works, tell me EXACTLY what you did.
EDIT: I just read a bunch of the readme... <3 TEXTMACROS AND LIBRARIES <3
Tables come from Vexorian's CSCache though... right? Anyway, I'll read up.
Also, I found something that might be a WE syntax highlighter, just now.
http://www.thehelper.net/forums/showthr ... ght=syntax
I tried it out and it didn't work. Can you try it? If it works, tell me EXACTLY what you did.
EDIT: I just read a bunch of the readme... <3 TEXTMACROS AND LIBRARIES <3
-
- Honorary wc3edit.net Traitor
- Posts: 2507
- Joined: February 1st, 2007, 4:11 pm
- Location: NEVADA
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
Re: Jass pros and hackers, tell me what you make of this.....
Vex's CS cache is called "GetTableUnit" but it really is GetStored...ect.
I think he just called the custom functions that to simplify/clarify things and to prevent duplicate function names with KaTTaNa's Handle Vars system.
I'm also hearing word of improvments for the struct system coming out soon =3
This will enable for much smoother maps, specifically concerning hero arenas.
I think he just called the custom functions that to simplify/clarify things and to prevent duplicate function names with KaTTaNa's Handle Vars system.
I'm also hearing word of improvments for the struct system coming out soon =3
This will enable for much smoother maps, specifically concerning hero arenas.
-
- Senior Member
- Posts: 101
- Joined: June 1st, 2007, 9:05 pm
Re: Jass pros and hackers, tell me what you make of this.....
Wow... I guess there's still alot of Jass to learn for me 
OFF-TOPIC even more than vJass: This forum needs a tutorial section.

OFF-TOPIC even more than vJass: This forum needs a tutorial section.
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
Re: Jass pros and hackers, tell me what you make of this.....
I know.
I don't do map cheating requests for people anymore nor do I support it. However, I do support the site because you can power learn map editing for the first while.
I need in with the people who are better at JASS than me and know more. I don't think I can learn that much more on these forums seeing I'm probably the best at JASS here.
I don't do map cheating requests for people anymore nor do I support it. However, I do support the site because you can power learn map editing for the first while.
I need in with the people who are better at JASS than me and know more. I don't think I can learn that much more on these forums seeing I'm probably the best at JASS here.
-
- Senior Member
- Posts: 101
- Joined: June 1st, 2007, 9:05 pm
Re: Jass pros and hackers, tell me what you make of this.....
I have a feeling that you are too. That's why http://www.wc3jass.com exists... I'm addicted to that site.
You're an administrator though... can't you make a tutorials section, or at least a poll to see if people would like one?
You're an administrator though... can't you make a tutorials section, or at least a poll to see if people would like one?
-
- Shopping Maul USA Creator
- Posts: 1792
- Joined: January 18th, 2007, 11:07 am
- Title: No Comment
- Location: Calgary Canada
- Has thanked: 78 times
- Been thanked: 8 times
Re: Jass pros and hackers, tell me what you make of this.....
Well, my post just got a little too advanced for me. I´ll be over at mickey-mouse-club.com if anyone needs me.
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada