• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Have something really wrong with Editor?

Status
Not open for further replies.
Level 7
Joined
Aug 31, 2006
Messages
132
Hello. I tried to use JASS from the tutorial 1.
But Wolrd editor doesnt seem to like them.
It always says that they have errors (But i really copiy-pasted that from tutorial), does not approve call and after i saved the map it simple converted some words in the trigger on its own. Is something wrong with my World editor?
 
Level 11
Joined
Jul 12, 2005
Messages
764
If you have Frozen Throne, your editor is fine, the problem lies within what you're doing.
Tell us what you did (exactly) step-by-step, or post your trigger (not only the function) here.
We can't really help you if you say, "I got error messages. Did i do sthg wrong, or my editor is the evil?"
Understand?
 
Level 7
Joined
Aug 31, 2006
Messages
132
Ok.

In this forum here is the JASS tutorial.
In first lesson there is shown how to make an simple JASS code.

1. Making a new Trigger Named HelloWorld and writing (I cutted and pasted) :
function HelloWorld takes nothing returns nothing
call BJDebugMsg("Hello World")
endfunction

2. Making new script (GUI) with the Event Pressing Left Keyboard Button with Action Custom Script : call HelloWorld()

Ok now to the errors.

1. If i try to save then it says that there is no function! (call HelloWorld())
It only works if you make an Call Script GUI action. And if you THEN convert this to text is looks really different...:

function Trig_Callit_Actions takes nothing returns nothing
call TriggerExecute( gg_trg_HelloWorld )
endfunction

//===========================================================================
function InitTrig_Callit takes nothing returns nothing
set gg_trg_Callit = CreateTrigger( )
call TriggerRegisterPlayerKeyEventBJ( gg_trg_Callit, Player(0), bj_KEYEVENTTYPE_DEPRESS, bj_KEYEVENTKEY_LEFT )
call TriggerAddAction( gg_trg_Callit, function Trig_Callit_Actions )
endfunction

And it does not work in game. (Pressing left button - nothing happens)

2. After i save the text

function HelloWorld takes nothing returns nothing
call BJDebugMsg("Hello World")
endfunction

changes too.
Into:

function InitTrig_HelloWorld takes nothing returns nothing
set gg_trg_HelloWorld = CreateTrigger( )
call TriggerAddAction( gg_trg_HelloWorld, function Trig_HelloWorld_Actions )
endfunction

I dont know why.
 
Level 11
Joined
Jul 12, 2005
Messages
764
You have to copy those user-created functions into the map's custom script section. In the trigger editor, click on the very first "trigger" in the list. It has your map's filename. On the right side, you can see a blank area (the lower and bigger one). Copy the functions there.
 
Status
Not open for further replies.
Top