1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[JASS] Erm... I'm Kind Of A New JASS Triggerer, I Hope You'll Help Me Here...

Discussion in 'Triggers & Scripts' started by Miss_Foxy, Nov 25, 2010.

  1. Miss_Foxy

    Miss_Foxy

    Joined:
    Oct 15, 2008
    Messages:
    2,821
    Resources:
    0
    Resources:
    0
    Okay:)
    Erm, would somebody give me a step by step guide (If you really don't mind) on how to phrase functions? Because I seem a bit confused at where to put ( )s , ' 's, endloops, globals, locals and etc, please do help me...
    I'm really sorry to trouble you guys, but thank you once again for helping me, you'll definitely get credits and reputation points from me once I understand how JASS works:)
     
  2. Nestharus

    Nestharus

    Joined:
    Jul 10, 2007
    Messages:
    6,149
    Resources:
    8
    Spells:
    3
    Tutorials:
    4
    JASS:
    1
    Resources:
    8
  3. HINDYhat

    HINDYhat

    Joined:
    Apr 22, 2007
    Messages:
    1,594
    Resources:
    3
    Maps:
    2
    Spells:
    1
    Resources:
    3
    Please stop apologizing.
     
  4. Miss_Foxy

    Miss_Foxy

    Joined:
    Oct 15, 2008
    Messages:
    2,821
    Resources:
    0
    Resources:
    0
    Thank you:)
     
  5. Squiggy

    Squiggy

    Joined:
    Mar 25, 2008
    Messages:
    2,604
    Resources:
    18
    Maps:
    2
    Spells:
    15
    Tutorials:
    1
    Resources:
    18
    ' ' is for putting in values like strings and integers (units, texts)
    Within () you put all the necessary parameters for the function you're calling

    endloop ends a loop, goes like:
    -loop
    --exitwhen i = 8
    --set i=i+1
    -endloop

    and globals + locals go at the top of your actions-function
     
  6. Adiktuz

    Adiktuz

    Joined:
    Oct 16, 2008
    Messages:
    9,674
    Resources:
    23
    Models:
    2
    Packs:
    1
    Maps:
    1
    Spells:
    16
    Tutorials:
    1
    JASS:
    2
    Resources:
    23
    ' ' is for hex integers, not for strings

    " " is for strings...
     
  7. Nestharus

    Nestharus

    Joined:
    Jul 10, 2007
    Messages:
    6,149
    Resources:
    8
    Spells:
    3
    Tutorials:
    4
    JASS:
    1
    Resources:
    8
    No >.>.

    ' ' is for ascii integers
    0x is for hexadecimal
    0 is for octal

    Acii
    'hfoo'

    Hex
    0x1AB

    Octal
    0125
     
  8. Adiktuz

    Adiktuz

    Joined:
    Oct 16, 2008
    Messages:
    9,674
    Resources:
    23
    Models:
    2
    Packs:
    1
    Maps:
    1
    Spells:
    16
    Tutorials:
    1
    JASS:
    2
    Resources:
    23
    oh, I thought it was hex. ^_^

    thanks for the clarification. ^_^
     
  9. Miss_Foxy

    Miss_Foxy

    Joined:
    Oct 15, 2008
    Messages:
    2,821
    Resources:
    0
    Resources:
    0
    What are Hex integers? o.o
     
  10. Adiktuz

    Adiktuz

    Joined:
    Oct 16, 2008
    Messages:
    9,674
    Resources:
    23
    Models:
    2
    Packs:
    1
    Maps:
    1
    Spells:
    16
    Tutorials:
    1
    JASS:
    2
    Resources:
    23
  11. Miss_Foxy

    Miss_Foxy

    Joined:
    Oct 15, 2008
    Messages:
    2,821
    Resources:
    0
    Resources:
    0
    Oh, I think I've seen it in some tutorial, by the way, when trying to trigger something with:
    Code (vJASS):
    function Example takes unit returns nothing
    endfunction


    Is this:

    Code (vJASS):
    function Example takes unit('A000') returns nothing
    endfunction


    Different from this?

    Code (vJASS):
    function Example takes unit returns nothing
    call CreateUnit('A000')
    endfunction


    I'm really sorry... But I'm quite confused. Also, if any of you know of anymore programming languages for Warcraft III besides the ones stated, please inform me, thank you:)
     
  12. Adiktuz

    Adiktuz

    Joined:
    Oct 16, 2008
    Messages:
    9,674
    Resources:
    23
    Models:
    2
    Packs:
    1
    Maps:
    1
    Spells:
    16
    Tutorials:
    1
    JASS:
    2
    Resources:
    23
    you cannot do that I think... unit is an object, 'A000' is an integer...

    plus the takes part, takes a parameter to be used by the function

    Code (vJASS):

    function Example takes unit a returns nothing
       call KillUnit(a)
       //This would kill the unit passed onto this function
    endfunction

    function Init takes nothing returns nothing
       call Example(MyHero)
       //Doing this would pass the unit MyHero to the function Example, so MyHero would be killed
    endfunction

    function Init2 takes nothing returns nothing
       call Example(MyHero2)
       //now this would kill MyHero2
    endfunction
     


    IDK why, but this seems to be getting nowhere...

    maybe you should start by doing triggers in GUI and then convert it into JASS, then study the resulting function...
     
  13. Nestharus

    Nestharus

    Joined:
    Jul 10, 2007
    Messages:
    6,149
    Resources:
    8
    Spells:
    3
    Tutorials:
    4
    JASS:
    1
    Resources:
    8
    Because you seem a bit lost on functions, I shall post up chapter 7 from my secret tut : |

    Chapter 7- Functions

    What is a Function?
    The Syntax of a Function
    Function Naming Convention
    Exercises
     
  14. Miss_Foxy

    Miss_Foxy

    Joined:
    Oct 15, 2008
    Messages:
    2,821
    Resources:
    0
    Resources:
    0
    I'm really really sorry... I just seem really confused at programming. But I won't mind, I'll just keep trying until I get it:)
    Uhm... Are there other programming languages in Warcraft III too?
     
  15. Nestharus

    Nestharus

    Joined:
    Jul 10, 2007
    Messages:
    6,149
    Resources:
    8
    Spells:
    3
    Tutorials:
    4
    JASS:
    1
    Resources:
    8
    RtC means that you can do any and all programming languages since it loads dlls.

    vjass source is Delphi
    cjass source is assembly
     
  16. Miss_Foxy

    Miss_Foxy

    Joined:
    Oct 15, 2008
    Messages:
    2,821
    Resources:
    0
    Resources:
    0
    You mean even C++?
     
  17. Nestharus

    Nestharus

    Joined:
    Jul 10, 2007
    Messages:
    6,149
    Resources:
    8
    Spells:
    3
    Tutorials:
    4
    JASS:
    1
    Resources:
    8
    any language ; |. I know dlls can't be written in any language, but they can sure as hell interpret or do w/e they want ; P.
     
  18. Miss_Foxy

    Miss_Foxy

    Joined:
    Oct 15, 2008
    Messages:
    2,821
    Resources:
    0
    Resources:
    0
    Hmm... Well I'll try learning JASS first then, do pop by to give me a question Nestharus:)

    PS: Oh, and by any language do you really mean any language? Meaning even Java and C ?
     
  19. Nestharus

    Nestharus

    Joined:
    Jul 10, 2007
    Messages:
    6,149
    Resources:
    8
    Spells:
    3
    Tutorials:
    4
    JASS:
    1
    Resources:
    8
    That is correct.
     
  20. Miss_Foxy

    Miss_Foxy

    Joined:
    Oct 15, 2008
    Messages:
    2,821
    Resources:
    0
    Resources:
    0
    Wow! So, do the players need RtC to play maps made using RtC with other languages too?