找回密码
 点一下
查看: 806|回复: 4

关闭魔兽后才出现的错误,游戏的时候却不会,

[复制链接]
发表于 2010-6-2 15:08:08 | 显示全部楼层 |阅读模式
如图,我到底哪里引起了这个致命错误,这个错误只有在魔兽退出的时候才有,我经常遇到这样的情况,请问这大概什么原因,其中有的我把set xx=null去掉就不会出现这个,有没有人遇到和我类似的情况,望各位大大指点
 楼主| 发表于 2010-6-2 15:27:30 | 显示全部楼层
现在遇到的情况是由于两个触发引起的,一个事单位进入某个区域,命令中立玩家的某个id的怪物攻击进入区域的玩家。另一个触发就是,任意中立单位死亡,如果单位拥有者是中立玩家,如果单位就是上面提到的怪物那就过十秒后复活这个怪物。如此,当我杀完几波以后就出现上面这个,只有退出魔兽才会出现的框框,也不知道会不会影响魔兽运作,求高人指点。。。
回复

使用道具 举报

 楼主| 发表于 2010-6-2 18:04:59 | 显示全部楼层
错了错了,进过试验(至少杀了8000个怪,杀怪越多出现错误概率就越大),是那个复活函数有问题,但不知道问题出在哪里,怎么没有人啊?难道从来没有人遇到和我一样的问题吗
下面是复活的函数
function heroresurrection takes nothing returns nothing
local timer tm=GetExpiredTimer()
local unit hero=LUtm(2,tm,"hero")
call ReviveHero(hero,GetUnitX(udg_company),GetUnitY(udg_company)+200,true)
call DestroyTimerDialog(LoadTimerDialogHandle(udg_HT[2],GetHandleId(tm),StringHash("td")))
call DestroyTimer(tm)
set tm=null
set hero=null
endfunction
function animalresurrection takes nothing returns nothing
local timer tm=GetExpiredTimer()
local unit animal=LUtm(2,tm,"animal")
local integer uid=GetUnitTypeId(animal)
local real x
local real y
local unit monstor
if uid=='nsln' then
set y=GetRandomReal(-2226,245)
set x=GetRandomReal(9783,11296)
set monstor=CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE),uid,x,y,bj_UNIT_FACING )
set animal=null
set monstor=null
call DestroyTimer(tm)
set tm=null
endif
call DestroyTimer(tm)
set animal=null
set tm=null
endfunction


function Trig_resurrection_Actions takes nothing returns nothing
local timer tm
local timerdialog td
if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO) then
set tm=CreateTimer()
call SUtm(2,tm,"hero",GetTriggerUnit())
set td= CreateTimerDialogBJ(tm,"Time to resurrecte")
call SaveTimerDialogHandle(udg_HT[2],GetHandleId(tm),StringHash("td"),td)
call TimerStart(tm,15,false,function heroresurrection)
set tm=null
set td=null
endif
if IsUnitOwnedByPlayer(GetTriggerUnit(),Player(PLAYER_NEUTRAL_AGGRESSIVE)) then
if GetUnitTypeId(GetTriggerUnit())=='nsln' then
set tm=CreateTimer()
call SUtm(2,tm,"animal",GetTriggerUnit())
call TimerStart(tm,1,false,function animalresurrection)
set tm=null
endif
endif
endfunction

//===========================================================================
function InitTrig_resurrection takes nothing returns nothing
    set gg_trg_resurrection = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_resurrection, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddAction( gg_trg_resurrection, function Trig_resurrection_Actions )
endfunction
回复

使用道具 举报

 楼主| 发表于 2010-6-2 21:42:11 | 显示全部楼层
请问是我没有清除哈希表储存的字符串的问题吗?8000个怪只需要8000个字符串,这样也会导致数据溢出么?还是,纯RP问题。。。
回复

使用道具 举报

 楼主| 发表于 2010-6-3 12:46:44 | 显示全部楼层
几天了……一直困扰着我。。。
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-7-4 23:21 , Processed in 0.039838 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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