# Beginning JASS Tutorial Series

Discussion in 'JASS/AI Scripts Tutorials' started by wyrmlord, Feb 16, 2007.

1. ### Vercas

Joined:
Dec 9, 2007
Messages:
2,604
Resources:
1
Spells:
1
Resources:
1
I don't know too much JASS, but the real numbers mustn't have .00 or .[any number from 0 to 9][any number from 0 to 9]?

I think that you must add to the random real 0.00 and 10000.00 and 360.00

2. ### Herman

Joined:
Aug 20, 2007
Messages:
877
Resources:
0
Resources:
0
I'm not sure what you mean. As far as I know, your wrong, reals can be any real number, and the syntax for getting a random real in JASS is using that GetRandomReal function

3. ### Vercas

Joined:
Dec 9, 2007
Messages:
2,604
Resources:
1
Spells:
1
Resources:
1
Yes but 0 and 10000 are integers
0.00 and 10000.00 are reals
Shouldn't it be like this?
I just want to know

4. ### Herman

Joined:
Aug 20, 2007
Messages:
877
Resources:
0
Resources:
0
Ohhhhhh, no it doesn't matter

5. ### Vercas

Joined:
Dec 9, 2007
Messages:
2,604
Resources:
1
Spells:
1
Resources:
1
I just wanted to know

6. ### tanthanh121

Joined:
Aug 16, 2008
Messages:
68
Resources:
0
Resources:
0
Ahh! My brain it hurts from reading it! Seriously this is too hard! What the heck is HelloWorld and all that gibberish.

7. ### DrazharLn

Joined:
Nov 29, 2007
Messages:
368
Resources:
0
Resources:
0
I personally found the tutorial very helpful, perhaps you should try another tutorial or try one for pascal or C [they are somewhat similar in structure as programming languages to JASS, though they are of course much more powerful]

The hello world program is just a program that prints the words "Hello World" onto the screen, its a standard programming thing and is about the simplest program you can write.

I recommend reading Herman's posts in this thread, he's very good at explaining JASS to people.

This is an example of the Hello World program, written in Pascal:
Code (Text):

program helloWorld;

begin
write('Hello World!);
end.

compare that with the JASS version:
Code (vJASS):

function helloWorld takes nothing returns nothing
call BJDebugMsg("Hello World")
endfunction

You can clearly see the similarities.

8. ### tanthanh121

Joined:
Aug 16, 2008
Messages:
68
Resources:
0
Resources:
0
What does HelloWorld even do?

9. ### HappyTauren

Joined:
Nov 3, 2006
Messages:
8,414
Resources:
87
Models:
61
Icons:
23
Packs:
1
Tutorials:
2
Resources:
87
Holy shit, are you stupid? You got your answer one post above.

10. ### Vercas

Joined:
Dec 9, 2007
Messages:
2,604
Resources:
1
Spells:
1
Resources:
1
HelloWorld is a function... Calling this function just runs the function.
Looks like here the function HelloWorld calls another ALREADY EXISTING function(made by blizzard ) that displays a message on the screen...

11. ### TurtleRacingCar

Joined:
Sep 13, 2008
Messages:
244
Resources:
7
Icons:
4
Skins:
3
Resources:
7
aaaaah! another "hello world" example

12. ### Vercas

Joined:
Dec 9, 2007
Messages:
2,604
Resources:
1
Spells:
1
Resources:
1
It's the simplest example
I am learning JASS alone, not with tutorials because tutorials don't help me too much
JassNewGen helps me learning faster
and Jass Craft is my best friend

13. ### DrazharLn

Joined:
Nov 29, 2007
Messages:
368
Resources:
0
Resources:
0
I find that simply looking at examples and coding stuff helps best.

@tanthanh121,
I've explained as clearly as I can what a HelloWorld program is. Please read my post, it's ludicrously simple.

Joined:
Oct 10, 2008
Messages:
66
Resources:
1
Template:
1
Resources:
1
AHHH!! Its driving me nuts but i did learn a few things

15. ### penguindemon

Joined:
Aug 17, 2008
Messages:
22
Resources:
0
Resources:
0
THIS DID NOT HELP ME AT ALL when u were talking about the units it didnt say to put it in the custom script or the trigger which completely destroyed all of this. and made it hella confusing to me

Joined:
Nov 3, 2006
Messages:
8,414
Resources:
87
Models:
61
Icons:
23
Packs:
1
Tutorials:
2
Resources:
87

17. ### Arusar

Joined:
Nov 9, 2008
Messages:
80
Resources:
0
Resources:
0

and the worst i still don't understand

18. ### Vercas

Joined:
Dec 9, 2007
Messages:
2,604
Resources:
1
Spells:
1
Resources:
1
That's why i took first time i readed it.
I didn't read it twice and i didn't read any other jass tutorial.
Belive me, you don't realise yet but it actualy helped you a lot!(as it helped me a lot)

19. ### Rahl

Joined:
Dec 1, 2008
Messages:
1
Resources:
0
Resources:
0
I can't make the spell code work
It keeps saying I have undeclared variables. Here are the variables it says are undeclared, and how I set them:
Code (Text):
set temp_loc = GetUnitLoc(temp)
set gg_trg_slash = CreateTrigger()
Plz help

20. ### moomoocow1314

Joined:
Dec 10, 2008
Messages:
59
Resources:
0
Resources:
0
Thank you this wonderful tutorial, i guess i can pretty much starting JASS-ing now XD