- Joined
- Mar 29, 2011
- Messages
- 3,764
I want to understand JASS, and as I move on reading some tutorials, I was able to grasp simple knowledge of it, but, this little problem is bothering me. What is wrong with this code?
Please, could someone be kind to explain. The JASS checker in JNGP says this has no errors but, this won't run the game. The game seems loading but it just like pause and doesn't open the game.
Please, could someone be kind to explain. The JASS checker in JNGP says this has no errors but, this won't run the game. The game seems loading but it just like pause and doesn't open the game.
JASS:
function Action_Create_Unit takes nothing returns nothing
local integer u_int = 'hpea'
local real x = 1
local integer u_Num = 1
local real y = 1
local player p = Player(0)
local integer time = 5
local unit u
local string t_string = "This is my first Jass"
call BJDebugMsg(t_string)
if time > 0 then
set time = time - 1
loop
exitwhen time == 0
call CreateUnit(p, u_int, x, y, 0)
endloop
endif
endfunction
//===========================================================================
function InitTrig_Melee_Initialization takes nothing returns nothing
set gg_trg_Melee_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Melee_Initialization, function Action_Create_Unit )
call TriggerRegisterTimerEventPeriodic(gg_trg_Melee_Initialization, 1)
endfunction