找回密码
 点一下
楼主: mnbvcxzqwe

我的这个J错误在哪了?

[复制链接]
发表于 2008-8-12 14:11:06 | 显示全部楼层
那就是你没改对,我按我前面说的测试了下,完全通过

[codes=jass]function H2I takes handle h returns integer
return h
return 0
endfunction

function I2U takes integer i returns unit
return i
return null
endfunction

function I2TD takes integer i returns timerdialog
return i
return null
endfunction

function GameCache takes nothing returns gamecache
if udg_GC == null then
call FlushGameCache(InitGameCache("map.w3v"))
set udg_GC = InitGameCache("map.w3v")
endif
return udg_GC
endfunction

function tiaojian takes nothing returns boolean
if (not(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO) == true )) then
return false
endif
return true
endfunction

function jishiqi takes nothing returns nothing
local unit u =I2U(GetStoredInteger(GameCache(),I2S(H2I(GetExpiredTimer())),"TriggerUnit"))
local timerdialog td = I2TD(GetStoredInteger(GameCache(),I2S(H2I(GetExpiredTimer())),"TimerDialog"))
call ReviveHeroLoc(u,GetRectCenter(GetPlayableMapRect()), false )
call DestroyTimerDialog(td)
call FlushStoredMission(GameCache(), I2S(H2I(GetExpiredTimer())))
set u = null
set td = null
endfunction

function fh takes nothing returns nothing
local unit u = GetTriggerUnit()
local timer t = CreateTimer()
local timerdialog td = CreateTimerDialog(t)
call TimerDialogSetTitle(td, GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + "复活时间:" )
call StoreInteger(GameCache(),I2S(H2I(t)),"TriggerUnit",H2I(GetTriggerUnit()))
call StoreInteger(GameCache(),I2S(H2I(t)),"TimerDialog",H2I(td))
call TimerStart(t,180,false,function jishiqi)
call TimerDialogDisplay(td,true)
set u = null
set t = null
set td = null
endfunction

//===========================================================================
function InitTrig_rh takes nothing returns nothing
local trigger tri = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(tri,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(tri,Condition(function tiaojian))
call TriggerAddAction(tri,function fh)
set tri = null
endfunction[/codes]
回复

使用道具 举报

 楼主| 发表于 2008-8-12 23:47:13 | 显示全部楼层
谢谢猪头大人了,原来是我写错了,我把boolean这个写到了jishiqi那了,搞错了.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-11-24 18:43 , Processed in 0.029414 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表