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 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