|
下面函数有的有错,请找出错误,指明这样写的结果是什么样的,并说明为什么出错.
(目的都是想在游戏开始3秒后,显示一串字)
1.
[codes=jass]
function Trig_Error_Actions takes nothing returns nothing
call BJDebugMsg("this is jass codes")
endfunction
function InitTrig_Error takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerSleepAction(3.0)
call TriggerAddAction(t,function Trig_Error_Actions)
endfunction
[/codes]
2
[codes=jass]
function WaitTime takes nothing returns nothing
call TriggerSleepAction(3.0)
endfunction
function Trig_Error_Actions takes nothing returns nothing
call ExecuteFunc("WaitTime")
call BJDebugMsg("this is jass codes")
endfunction
function InitTrig_Error takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerAddAction(t,function Trig_Error_Actions)
endfunction
[/codes]
3.
[codes=jass]
function WaitTime takes nothing returns nothing
call TriggerSleepAction(2.0)
endfunction
function Trig_Error_Actions takes nothing returns nothing
local timer t=CreateTimer()
call TimerStart(t,1.0,false,function WaitTime)
call BJDebugMsg("this is jass codes")
endfunction
function InitTrig_Error takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerAddAction(t,function Trig_Error_Actions)
endfunction
[/codes]
4.
[codes=jass]
function WaitTime takes nothing returns nothing
call TriggerSleepAction(3.0)
endfunction
function Trig_Error_Actions takes nothing returns nothing
call WaitTime()
call BJDebugMsg("this is jass codes")
endfunction
function InitTrig_Error takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerAddAction(t,function Trig_Error_Actions)
endfunction
[/codes] |
|