Tutorial The Complete Guide to JASS, vJASS, and cJASS

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
Luckily, I just covered functions in school last year :), I'm sortof getting it now.....but not fully.

Sad, I learn it in this year. :(

JASS:
library Cheese requires Boo
    function Oi takes nothing returns nothing
        call Boo_Hi_DeeDee()
        call Boo_DooDoo()
    endfunction
endlibrary

lol, funky name. :shades:
 

Nestharus

o-o
Reaction score
84
I still stand by what I said previously in that this doesn't explain much at all, and what is explained is explained either in a pretty poor way, or by simply copying something from another website.
I don't think you're particularly gifted in the art of tutorial-writing. Stick to making actual code instead. :p

And I still find the tag abuse absolutely horrible.

All complaints I've had so far resulted in the person not reading the links and having 0 programming experience, which doesn't work =P.

The reason there are links is because they have really fantastic descriptions. I figured quoting and citing it was really dumb, especially considering how big the guide is already =). It's not hard to click a link : P.

Oh well, I still have to get to writing a few more chapters : |. Hopefully I'll get a few done this weekend.

And rather than comments like, this description is bad or this or that, why not suggest a better description? Don't suggest ones for the links tho, only suggest descriptions over what is actually inside this guide, what I wrote myself ^_^. Descriptions on the links are plain awesome ^_^.

For example, I think the hardest concept is the idea of a function. Now when reading the function description in the link, you can pretty much understand that it takes values. As for retuning values, it doesn't explain that.

I try to explain it in terms of a variable, sort of like what we already covered. I try to say it's like a variable that can take and return ^_^. It's type is the return and it's take is the parameters. Now, with C or C# or C++ syntax, this would be pretty easy to see-

int myMethod() {}

but in JASS ><

function Hello takes nothing returns nothing
endfunction

I mean, it's easy to see if you treat the var as a function type, but then you have to grasp it totally differently, like a totally new variable type that is just totally weird o-o.

I guess I could say-
input -> machine[crunch...crunch..] -> output

Plug integer x in

x -> machine(crunch x) -> output

returns an integer

x -> machine(crunch x) -> integer

I mean, there are so many ways to do it. What do you think is the best way? I got a bundle of ideas on how to describe it, actually.... when functions are initially described in mathematics, they are described with the machine method by good instructors =).

like x -> machine(3x + 3) -> real

3 -> machine(3*3+3 -> 12

You know what, I think I'll rewrite functions to describe it like that ^_^.


Oh, and the tags.... we already tried it without tags and it wasn't readable. We tried it with just the spoiler tags and was still unreadable. The tags are a necessary evil : P.

Oh yea, and if you want to write a chapter or attempt to rewrite a chapter and it's better, I'll put it in the guide and say Chapter Written by: you

I'm hoping this is the best guide for JASS that can be read by all. I'm doing this for the community and I'm doing this so we can get more cool resources and better maps : D. Pick something you really want to delve into and write about it in plain english or find good descriptions of it =P. I'll keep it updated and compile all of the best resources into one awesome guide =).

Keep in mind that this is a guide, not a manual ><. Never use something that hasn't been discussed yet unless you are covering it in the chapter. Also, don't delve too deep =P. If you say like, an integer can be in all of these forms: bleh, blah, bloo, kaboom >< on the chapter for introducing vars, the person is going to exploderz ^_^. There should be a whole chapter on number systems and it should be at a later chapter =). Don't go over too much =P.

Those are my only tips I guess ^_^.

I really doubt anyone else is going to write chapters but me, but I'm giving it a shot =P.
 

Steel

Software Engineer
Reaction score
109
I always thought the best way to understand things was to read the manual. Vex put together a great manual for JassHelper, people should read it more often.
 

Nestharus

o-o
Reaction score
84
Many updates have taken place-

Chapters 4 thru 13 have been rewritten pretty hardcore to be way better. The operations chapter includes new operations, so I suggest you give it a read.

If you had a hard time understanding a chapter, like functions or scopes, you might want to try them again because they are way better ^_^.

Many chapters were removed as they were no longer needed (shorter guide overall).

Some chapters were unplaced to be covered at a later time because they were too much of an advanced topic.

Some things were removed from certain chapters (like DisplayTextToPlayer) as they were using too many advanced features o-o.

Oh yes, the functions chapter has had very, very extensive updates, so I suggest giving that a read too. It will go over some very nifty things with return statements that it didn't previously go over and you probably don't know about ^_-.

Local variables chapter also had extensive updates.

I'm almost done rewriting all of the current chapters to be really epic, so soon I will go over various handles and natives.

I've heard a lot of calls for the trigger handle to be gone over first... but.. they're the most complex of all the handles ><. I would think people would want to mess with the player handle and unit handle first =). Would you rather create units first on a map and make a little ladder map or run do triggers?

Here's my current plan-
1. Player
2. Unit
3. Items
4. Timer
5. Rects
6. Regions
7. ?? more required handles for triggers
8. Even more : O
x. Triggers and code variable

I will get to triggers as fast as I can, but they include a lot of events for a lot of various handles, and when I do go over triggers I want to go over everything.

So do you want to use a trigger but not use any events and have me go over events as I cover the handles associated with them, or would you rather me go over everything first and then go over events with the triggers ^_^.

I would still do a minimum of this-
1. Player
2. Unit
3. Timer
4. Trigger

But atleast you'd get into doing triggers faster.

Thank you everyone for your patience so far =). I got so many things going on o-o.
 

Narks

Vastly intelligent whale-like being from the stars
Reaction score
90
What is with the strange alternation between cJASS and JASS / vJASS syntax?
 

Nestharus

o-o
Reaction score
84
Think of it like this-

As a beginner who knows nothing about JASS, you won't know the difference. This gives a good chance to teach all three as one language. Saying this belongs to this and that belongs to that just makes it more confusing =).

I go over all the features of JASS, vJASS, and cJASS all in one big thing and at the start I just tell them to install all of them and that they need everything to continue ^_^.

Oh yea, and finally chapters 3 thru 20 are finished being rewritten ^_^.
 

Narks

Vastly intelligent whale-like being from the stars
Reaction score
90
seems pointless to learn two things when you are only going to use one

also the title thread says JASS and vJASS, not cJASS
 

Nestharus

o-o
Reaction score
84
I don't have the power to change the title =)

I am also teaching both things so that people can read all code
 

Nestharus

o-o
Reaction score
84
Actually, when I tried to cast the Power to Ask spell-
-------------------------------------------------------------------------
feels the power to ask coming on him

...


feels the power to ask welling up inside of him

... ...

fizzles
-------------------------------------------------------------------------

But anyways...

The Complete Guide to JASS, vJASS, and cJASS

That sounds like a pretty nifty title ^_^.
 

Nestharus

o-o
Reaction score
84
Chapter 22- Triggers Added
Covers everything to do with triggers except for handle specific functions-

ex-
GetTriggerUnit
TriggerRegisterUnitEvent
etc

Edit
Working on Chapter 23, the player ><, the first big chapter ><.
 

Sevion

The DIY Ninja
Reaction score
413
Error! Error! Danger, Will Robinson!
>[ljass]PLAYER_STATE_FOOD_CAP_CEILING[/jass]
Tags don't match! :p

Yeah, I saw that too XD It was the first thing I noticed.

Plus, I noticed that it's not as "complete" as I thought it'd be. That section doesn't tell me how I can check if a player is an observer. >_>

I mean, it just makes me more confused. Like, do I do [ljass]ConvertPlayerState(GetPlayerState(Player(0), PLAYER_STATE_OBSERVER)) == PLAYER_STATE_OBSERVER[/ljass]? Or what :p
 

Nestharus

o-o
Reaction score
84
Well, I got some of the defeat stuff done : P.

I'm a busy little boy ^_-, and the player API is huge : O.

Also, no comments on the trigger chapter, so I'm guessing everyone can understand it ok : p.
 

Romek

Super Moderator
Reaction score
963
I read through the first three or so chapters, and I must say that this is terrible.

There are no clear mentions of when you use cJass, vJass or just plain old JASS. Teaching cJass to beginners is simply stupid too. The explanations are rubbish, you simply describe what each thing does, which isn't a particularly great way of teaching. Some of those tasks are ridiculous too.

Also, the layout and formatting is still terrible. Spoiler abuse is ugly, it makes this tutorial a pain to read through. I've mentioned this numerous times, I believe.

Good job on making the effort to write such a long tutorial though.

GY'd.

You may want to consider writing for the wiki by the way. I think this guide was attempted to be organized like a wiki, though obviously, due to this being a forum, didn't quite work.
 

Nestharus

o-o
Reaction score
84
Considering people who have read this guide have had 0 problems understanding it, I think you're wrong.


I'll continue writing, referencing, and linking to this.



Also notice that when I fixed chapters, all new replies on them (issues) went away. There have been 0 questions regarding trigger chapter, and the few regarding player is because it isn't done yet ><.


It explains everything in extreme detail and goes into how to use it. It also explains things in such a way that people can write their own code with a full understanding of it as quickly as possible.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/
  • The Helper The Helper:
    Here is another comfort food favorite - Million Dollar Casserole - https://www.thehelper.net/threads/recipe-million-dollar-casserole.193614/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top