JASS: Introduction

Rad

...
Reaction score
228
Um maybe im getting an error, about 3/4 of those code fields are empty, and 2 are all messed up and stretched out of the box. I restarted my browser, am I the only one with this problem in this thread?
 
R

Ralle_Janis

Guest
Man this is very nice, one time when i feel like learning JASS, i will use this :D
 

uberfoop

~=Admiral Stukov=~
Reaction score
177
thanks for not explaining jass


GENERIC USELESS TUTORIAL STAMP
APPROVED BY UBERFOOP



sry man, but when people make jass tutorials, what ive always looked for first thing is HOW the initial function lines work, WHAT the arguements do-just saying that they are called arguements is barely more then gibberish.
 
T

The_Prophet

Guest
this tutorial is anything but a " GENERIC USELESS TUTORIAL" This is the same tutorial i learned from, only on wc3jass.com, and i would consider it the best jass tutorial on the net. Especially for someone new to programing.
 

uberfoop

~=Admiral Stukov=~
Reaction score
177
fine-maybe ill take your word for it and read the entire article and then decide if it makes sense...
 

Sargon

New Member
Reaction score
83
uberfoop said:
fine-maybe ill take your word for it and read the entire article and then decide if it makes sense...

He explains the arguments in there, just not in the beginning.
 

Vexorian

Why no custom sig?
Reaction score
187
uberfoop said:
thanks for not explaining jass


GENERIC USELESS TUTORIAL STAMP
APPROVED BY UBERFOOP



sry man, but when people make jass tutorials, what ive always looked for first thing is HOW the initial function lines work, WHAT the arguements do-just saying that they are called arguements is barely more then gibberish.
You are confusing a JASS tutorial with an explanation of each native function blizzard has added. blerg wc3jass.com jass.sourceforge.net/doc/ for that stuff .

You can't learn to use a blizzard's function if you didn't learn how to use JASS before doing that.
 

uberfoop

~=Admiral Stukov=~
Reaction score
177
5 Stars! Go vex!

I love how it has to be a '5 star bump' by helper rather than just a bump
Just felt like saying that
 

ayumilove

Youtube account suspended! youtube.com/ayumilove8
Reaction score
110
5 star bumps <3

Nice tutorial! Probably one of the easiest tutorial to learn ^^
 

Vulcansurge

Ultra Cool Member
Reaction score
27
Its been a few years since you wrote this tutorial, and people are still learning from it. Great work! Five stars from me!
 

Demi666

New Member
Reaction score
127
lal great tut very nice, but most of it explains how to display text in diffrent ways^^ and how to you the " * , - , + , / " anyways really nice

readed whole thing^^
 
F

Flameboy

Guest
I just have one problem when you talk about global:

function Msg takes string s returns nothing
call DisplayTextToForce( GetPlayersAll(), s )
endfunction

function AddSubstract takes integer a, integer b returns nothing
set udg_r1=a+b
set udg_r2=a-b
endfunction

function Trig_JASS_test_Actions takes nothing returns nothing
local integer a=14
local integer b=56
call AddSubstract takes(a,b)
call Msg("a= "+I2S(a))
call Msg("b= "+I2S(b))
call Msg("The Addition is "+I2S(udg_r1))
call Msg("The Substraction is "+I2S(udg_r2))
endfunction

The red line always get me an error and I can't find out why its wrong. I have tried to re-type everything, and it didn't work, so I copy-pasted everything and it still isn't working. Can I get some help please?

By the way, excellent tutorial, first one I find which is really helping me.
 

Pyrogasm

There are some who would use any excuse to ban me.
Reaction score
134
You don't need the "takes" in there; the "takes" keyword is only used in the function name.

Thus, you'd call it like this:
JASS:
call AddSubtract(a,b)
 
F

Flameboy

Guest
Thanks a lot man, it works now :D
Would be a good idea to correct it in the tutorial.

Ps: How do I post a quick reply? The box is all grayish and it says ''click one of the quick reply icon in the post above'' but I just can't find the quick reply icon.
 

Pyrogasm

There are some who would use any excuse to ban me.
Reaction score
134
It's the second button to the right of the "quote" button. When you press it, it higlights and then brings you to the quick reply box.
 
F

Flameboy

Guest
When i click the link for the answers to the challenge, it just doesn't work. It brings me to wc3campaigns.com or something like that, and there is no answer around there.

Edit: I found the answer by myself now, but would still be useful to have the answers for the future challenge. I'm proud i got this one :D

And about the loop part, instead of making two locals, would it work to do:

function Trig_JASS_test_Actions takes nothing returns nothing
local integer a=GetRandomInt(1,5)
loop
call Msg("a= "+I2S(a))
exitwhen a==0
call Msg("Hello")
set a=a-1
endloop
endfunction

Seems like less trouble to me, would it cause leaks or something? Or is it fine?
 

Faust

You can change this now in User CP.
Reaction score
123
I'm lost :(

Calling a function

For calling functions we use:

call <Function Name>(Argument1,Argument2,...,ArgumentN)

In cases where the function takes no arguments, it is just:

call <Function Name>()

Functions can call other functions, AS LONG AS the other functions are written ABOVE the function in the map script. If a function is above other function in the same 'trigger', the other function may call it. But there is no safe way to make sure the contents of a custom trigger will be added to the map script before the contents of another trigger.

The Frozen Throne editor, comes with a "Custom Script section" feature, When you are at the trigger editor, click on the map's name, and you will be able to see the Custom Script section, that's a place for functions. The contents of the Custom Script section are added to the map script before the contents of every trigger.

An example wouldn't hurt:

JASS:
Code:

function Msg takes string s returns nothing
    call DisplayTextToForce( GetPlayersAll(), s )
endfunction

function ShowMessage takes nothing returns nothing
    call Msg(&quot;This is a message!&quot;)
endfunction

function ShowSum takes integer a, integer b returns nothing
 local integer r=a+b
    call Msg(&quot;r= &quot;+I2S(r))
endfunction

function Trig_JASS_test_Actions takes nothing returns nothing
   call ShowMessage()
   call ShowSum(33,45)
endfunction

The result will be:

This is a message!
r = 78
JASS:


I'm trying to learn, but I can't figure out that "s" letter at the beginning of the code.

Code:
function Msg takes string s returns nothing
    call DisplayTextToForce( GetPlayersAll(), [COLOR="Red"]s[/COLOR] )
endfunction

It gives me a bunch of errors :(

Can someone explain, or is it the wrong place to ask?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top