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 poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  4. Travel to distant realms and encounter scenes unknown to the common folk. The Greatest of Adventures is upon us with the 8th Cinematic Contest. Join in on a fun ride.
    Dismiss Notice
  5. The 18th Icon Contest is ON! Choose any ingame unit and give him/her Hero abilities. Good luck to all.
    Dismiss Notice
  6. Contestants are to create a scene set in the Stone Age. Come and see what you can come up with. We wish you the best of luck!
    Dismiss Notice
  7. Colour outside the lines! Techtree Contest #13 is a go. The contest is optionally paired.
    Dismiss Notice
  8. Greetings cerebrates, our Swarm needs new spawners that will have numerous children. Join the HIVE's 31st Modeling Contest - Spawners and Spawned! The contest is optionally paired.
    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.

Zinc question.

Discussion in 'World Editor Help Zone' started by Rugarus, May 12, 2018.

  1. Rugarus

    Rugarus

    Joined:
    Dec 2, 2016
    Messages:
    699
    Resources:
    0
    Resources:
    0
    This may be the wrong section of the forum for it, but it seems the most intelligent and active people are here.

    :


    I can't find a full library for Zinc. I need to basically set a variable that is equal to lets say player red. Anyone able to help me? Thanks. I could only find a sort of manual with a few demonstrations and basic examples but no full syntax library.
     
  2. BloodSoul

    BloodSoul

    Joined:
    May 10, 2009
    Messages:
    736
    Resources:
    2
    Spells:
    2
    Resources:
    2
    Personally, I've never used Zinc. However, according to its manual, it's as simple as this:

    Code (vJASS):

    //! zinc
    library MyLib
    {
        function onInit()
        {
            player varName = Player(0); // This declares a player variable, and it is assigning the Player Red to it.
            varName = Player(1); // This assigns Player Blue to it.
        }
    }
    //! endzinc
     

    You simply don't need to use the
    set
    keyword, and must add a semi-colon
    ;
    in the end of a statement.
     
    Last edited: May 12, 2018
  3. Rugarus

    Rugarus

    Joined:
    Dec 2, 2016
    Messages:
    699
    Resources:
    0
    Resources:
    0
    Can you link me the manual?
     
  4. BloodSoul

    BloodSoul

    Joined:
    May 10, 2009
    Messages:
    736
    Resources:
    2
    Spells:
    2
    Resources:
    2
    Sure