Vexorian's tutorial?

T

TheTacoBellD

Guest
I read the first part of his tutorial and it worked just fine. But when I got to number 2, "Variables", I lost it. He never explained to me WHERE I was supposed to put all of this code. Every time I tried to put the code in I got an error. How is this tutorial supposed to help?
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
I take it this: http://world-editor-tutorials.thehelper.net/cat_usersubmit.php?view=21329

is the tutorial you are talking about?

Well it's actually pretty simple. With global variables (the ones you make in the GUI), you always have to go to create a variable. However, when you are making a local variable

(a variable that is created specifically for 1 function, and can only be used in that function, except by the local handle variables system (Don't worry about it, you don't want to know it as a beginner)),

you automatically create it at the beginning of each function.

So when he has this line:

local string a="This is a message"

the first part, local tells the editor that you are about to create a local variable of some sort. The string part says that the local variable will be a string, and "a" is the name of the variable. When you create a variable, you don't HAVE to set it to a variable, but in this case, he did, and he set it to "This is a message".

For right now, you probably won't have a place to put the code, except in the map icon at the top of the trigger editor section. If you try and put it in an actual trigger, it will probably come up with errors saying that you don't have any events, or things like this.
 

Vexorian

Why no custom sig?
Reaction score
187
From the beginning:


Code:
[b]function Trig_JASS_test_Actions takes nothing returns nothing[/b]
    call DisplayTextToForce( GetPlayersAll(), "This is a message" )
[b]endfunction[/b]

//===========================================================================
function InitTrig_JASS_test takes nothing returns nothing
    set gg_trg_JASS_test = CreateTrigger(  )
    call TriggerRegisterPlayerEventEndCinematic( gg_trg_JASS_test, Player(0) )
    call TriggerAddAction( gg_trg_JASS_test, function Trig_JASS_test_Actions )
endfunction

The code you don't know where to put:
Code:
[b]function Trig_JASS_test_Actions takes nothing returns nothing[/b]
 local string a="This is a message"
    call DisplayTextToForce( GetPlayersAll(), a )
[b]endfunction[/b]

Notice the identical function names and well everything. You just have to replace the code. In fact, nobody else in the 6 moths , one year or whatever old this tutorial is had any problem understanding that. So you either have observation or abstraction issues and to sum to the problem you didn't even bother to try figuring out yourself, then programming (on any language) would be kind of hard to you, so be prepared. (There's the answer to the "how's it supposed to help?" question) . If you don't have observation, abstraction or independence issues then you probably were too tired, get some sleep.

Edit : I am not saying it is a bad thing, you probably would do better on the creative side, like art , literature, history and that stuff. But for abstraction you are not good.

Edit II: Seriously dude, notice the small difference between those blocks of code , the only difference is that second uses variables now. And that's what we were learning in that section , right?

Edit III: I actually described what was going on there:
In the example we just moved the message to the value of the variable named "a", then we used the variable in the Function that shows the message, we didn't put the variable name inside "".

See? That explanation points out that we are just modifying the first function.

Probably the real issue is that english is not your native language and I don't write it really well because it isn't my native language either. So trying to read a chaotic english text when you have little knowledge of english is like triple chaos.
 

Sim

Forum Administrator
Staff member
Reaction score
534
I suggest you edit your tutorial. It will not take long to add a few lines ;)

TheTacoBellD said:
How is this tutorial supposed to help?

By explaining what is JASS and how to use it :)
I heard only good comments about his tutorial so I guess anyone should have understood where to put the local variables.


It would have also helped you TacoBellD if you had posted your trigger and where you set the local variable. It could even be added in the tutorial ! ''Don't put them here, the good way is HERE (show where)"

Good luck ^^
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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