- Joined
- Feb 25, 2009
- Messages
- 2,004
Well, as I procced to the next level (Learning JASS), I was searching for a proper tutorial, and here is one: Vexorian's Introducing to JASS tutorial.
As I was reading it and trying to do what he explains in the tutorial and hit a part where I can't procced (eg. I can't make the script work), sadly I tryed everything (everything that I know) but the true is I can't make it work...
So here's is the script:
All the problem is in the R2 and D2 integers which I can't figure out to make them via the globals handle.
So if theres someone who can help, it will be realy nice.
Link to the tutorial: click here
PS: I'm using JassCraft v1.1.3 for writting the script, and then copy/paste it into converted JASS trigger in WE.
As I was reading it and trying to do what he explains in the tutorial and hit a part where I can't procced (eg. I can't make the script work), sadly I tryed everything (everything that I know) but the true is I can't make it work...
So here's is the script:
JASS:
globals
private constant integer R2 = 0
private constant integer D2 = 0
endglobals
function Msg takes string s returns nothing
call DisplayTextToForce( GetPlayersAll(), s)
endfunction
function AddSubstract takes integer a, integer b returns nothing
set udg_R2 = a+b
set udg_D2 = a-b
endfunction
function JASS takes nothing returns nothing
local integer a = 14
local integer b = 56
call AddSubstract(a,b)
call Msg("a= "+I2S(a))
call Msg("b= "+I2S(b))
call Msg("The addition is "+I2S(udg_R2))
call Msg("The substraction is "+I2S(udg_D2))
endfunction
All the problem is in the R2 and D2 integers which I can't figure out to make them via the globals handle.
So if theres someone who can help, it will be realy nice.
Link to the tutorial: click here
PS: I'm using JassCraft v1.1.3 for writting the script, and then copy/paste it into converted JASS trigger in WE.