1. The long-awaited results for Concept Art Contest #11 have finally been released!
    Dismiss Notice
  2. Join Texturing Contest #30 now in a legendary battle of mythological creatures!
    Dismiss Notice
  3. The 20th iteration of the Terraining Contest is upon us! Join and create exquisite Water Structures for it.
    Dismiss Notice
  4. Hivers united and created a bunch of 2v2 melee maps. Vote for the best in our Melee Mapping Contest #4 - Poll!
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice

Beginning JASS Tutorial Series

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

  1. Vercas

    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

    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

    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

    Herman

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

    Vercas

    Joined:
    Dec 9, 2007
    Messages:
    2,604
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Thank you for asking me :thumbs_up:
    I just wanted to know :D
     
  6. tanthanh121

    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

    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

    tanthanh121

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

    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

    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 :bored: ) that displays a message on the screen...
     
  11. TurtleRacingCar

    TurtleRacingCar

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

    Vercas

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

    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.
     
  14. Dethadow

    Dethadow

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

    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
     
  16. HappyTauren

    HappyTauren

    Joined:
    Nov 3, 2006
    Messages:
    8,414
    Resources:
    87
    Models:
    61
    Icons:
    23
    Packs:
    1
    Tutorials:
    2
    Resources:
    87
    Read.it.over.
     
  17. Arusar

    Arusar

    Joined:
    Nov 9, 2008
    Messages:
    80
    Resources:
    0
    Resources:
    0
    I got headache read them:ugly:

    and the worst i still don't understand :cry:
     
  18. Vercas

    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!:smile:(as it helped me a lot)
     
  19. Rahl

    Rahl

    Joined:
    Dec 1, 2008
    Messages:
    1
    Resources:
    0
    Resources:
    0
    I can't make the spell code work :sad:
    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 blinkEffect = AddSpecialEffectLox("Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl", temp_loc)
    set gg_trg_slash = CreateTrigger()
    Plz help :sad:
     
  20. moomoocow1314

    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