Warcraft 3 documentation
vJASS & Zinc Documentation
For the latest documentation about how it works vJASS and Zinc language layers for Warcraft III, please follow these links:
Jasshelper documentation - Zinc documentation - WC3 Optimizer documentation

I need some Jass help No New Posts General Help and WC3 Discussion

Started by
Anonymous

0 Members and 1 Guest are viewing this topic.

I need some Jass help
on: May 21, 2015, 01:28:10 PM

Hello!

I am Steve and i registrated here to ask some questions about jass.
I have already Jassnewgen pack and i want to learn how to code my own jass code.
So i tryed already some one line long scripts but i don't know how to use the jass librarys like this:

library GetTerrainZ /* v1.0.0.0
********************************************************************
*
*    function GetTerrainZ takes real x, real y returns real
*
********************************************************************/

    globals
        private constant location L = Location(0, 0)
    endglobals

    function GetTerrainZ takes real x, real y returns real
        call MoveLocation(L, x, y)
        return GetLocationZ(L)
    endfunction

endlibrary

if someone could help me in this i would realy appreciate it.
Okay i understand so far that these library snippets are short functions that i can call after i insert it into my code.
The question is:
Where must i place this code, when i wish to use it?


"When the wind dies down the leaves continue to fall."


Re: I need some Jass help
Reply #1 on: May 22, 2015, 06:51:41 PM

The idea is that you place this snippets in a GUI trigger.

How to do that? just create a new trigger, name it with the library name (in this case GetTerrainZ, or something you can identify clearly) and then convert it into custom code (Edit > Convert to Custom Text). There, you CnP the code snippet and save the map. That's all :)


Re: Thank you very much
Reply #2 on: May 23, 2015, 08:15:09 AM

Thank you the quick answer.  :)

I thought that was more complicated.
I will test it out today.




"When the wind dies down the leaves continue to fall."


Re: I need some Jass help
Reply #3 on: May 23, 2015, 09:40:12 AM

Thank you the quick answer.  :)

I thought that was more complicated.
I will test it out today.




No problem :)


Re: Tested out the first Jass scripts
Reply #4 on: May 24, 2015, 03:37:59 PM

Hello again!

I did what you say and after i test my map it simply go to back the menu.
When i click [Syntax check] it display hundreds of errors.
[Edit] Thesh's syntax check can't interpret vJass statements?
[Edit] http://www.hiveworkshop.com/forums/warcraft-editing-tools-277/jass-newgen-pack-cant-open-my-map-150597/
Last comment.
I need to do some changes if i want to write vJass triggers and test them in latest(1.26) warcraft?

« Last Edit: May 24, 2015, 07:15:51 PM by Anonymous »

"When the wind dies down the leaves continue to fall."


Re: I need some Jass help
Reply #5 on: May 25, 2015, 08:50:25 AM

Hello again!

I did what you say and after i test my map it simply go to back the menu.
When i click [Syntax check] it display hundreds of errors.
[Edit] Thesh's syntax check can't interpret vJass statements?
[Edit] http://www.hiveworkshop.com/forums/warcraft-editing-tools-277/jass-newgen-pack-cant-open-my-map-150597/
Last comment.
I need to do some changes if i want to write vJass triggers and test them in latest(1.26) warcraft?


Please post here the errors shown by JNGP so I can check them out.


Re: I need some Jass help
Reply #6 on: May 28, 2015, 10:51:43 AM

 :-[
After i convert to custom text the basic map initialization trigger and press the [syntax check] button


testmap:
http://www.mediafire.com/download/6iyfrrvvvjtcuky/testmap.w3x
« Last Edit: May 30, 2015, 09:48:53 PM by Anonymous »

"When the wind dies down the leaves continue to fall."


Re: I need some Jass help
Reply #7 on: June 05, 2015, 10:51:49 PM

Ok, I've tested it and no problems at all, I would need to check if you have Any issues with the file paths...


 

Vivir aprendiendo.co - A place for learning stuff, in Spanish   Chaos Realm - The world of Game modders and wc3 addicts   Diplo, a gaming community   Power of Corruption, an altered melee featuring Naga and Demon. Play it now!!!   WC3JASS.com - The JASS Vault + vJASS and Zinc   Jetcraft - A Starcraft II mod   WormTastic Clan (wTc)   Warcraft RESOURCES Reforged: Modelos, mapas, proyectos y mas...