• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Evaluated] [Assignment] Week 1

Status
Not open for further replies.
Level 16
Joined
Aug 20, 2009
Messages
1,552
http://www.hiveworkshop.com/forums/pastebin.php?id=k0g0zo

JASS:
//! runtextmacro variables()
    // This is where you should delcare your variables
    // Do it in between these two magical lines.
    // Remember, (type) (name)
    
    // Assignment sector:
    integer a
    integer b
    integer c
    integer d
    integer e
    integer f
//! runtextmacro endvariables()

//! runtextmacro actions()
    // This is where you should put all the code that modifies
    // and plays with the variables you declared above.
    // These run on map initialization for the sake of this 
    // lesson.
    set a = 3
    set b = 4
    set c = 2
    set d = a + b * c
    set e = a + (b * c)
    set f = (a + b) * c
    // You can erase all this green text and nothing would happen :D
    
    call print (I2S(d))
    call print (I2S(e))
    call print (I2S(f))
    // Assignment sector:
    // This is where all your assignment code could go.
    // Use the variables I declared above to complete the assignment.
    // I made it so that all numbers are printed to the screen when you 
    // hit save and run the map.
//! runtextmacro endactions()
 
Status
Not open for further replies.
Top