找回密码
 点一下
查看: 1636|回复: 1

为什么说无效的变量数字?

[复制链接]
发表于 2008-6-2 22:12:17 | 显示全部楼层 |阅读模式
function Trig_thunder_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'A006' ) ) then
        return false
    endif
    return true
endfunction

function Trig_thunder_Func004Func001C takes nothing returns boolean
    if ( not ( IsUnitType(udg_thunderaim, UNIT_TYPE_DEAD) == true ) ) then
        return false
    endif
    return true
endfunction

function Trig_thunder_Actions takes nothing returns nothing
    set udg_thunderlv = GetUnitAbilityLevelSwapped('A006', GetTriggerUnit())
    set udg_thunderaim = GetSpellTargetUnit()
    call TriggerSleepAction( 0.50 )
    set bj_forLoopAIndex = 1
    set bj_forLoopAIndexEnd = 8
    loop
        exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
        if ( Trig_thunder_Func004Func001C() ) then
            call DoNothing(  )
        else
            call AddLightningLoc( "CHIM", GetLocationX(GetUnitLoc(udg_thunderaim)), GetLocationY(GetUnitLoc(udg_thunderaim)), 0, GetLocationX(GetUnitLoc(udg_thunderaim)), GetLocationY(GetUnitLoc(udg_thunderaim)), 999.00 )
            call UnitDamageTargetBJ( GetTriggerUnit(), udg_thunderaim, ( 20.00 * I2R(udg_thunderlv) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC )
            call TriggerSleepAction( 0.02 )
            call DestroyLightning( GetLastCreatedLightningBJ() )
            call AddSpecialEffectTargetUnitBJ( "origin", udg_thunderaim, "Abilities\\Spells\\Orc\\Purge\\PurgeBuffTarget.mdl" )
            call TriggerSleepAction( 0.03 )
            call DestroyEffect( GetLastCreatedEffectBJ() )
            call TriggerSleepAction( 0.95 )
        endif
        set bj_forLoopAIndex = bj_forLoopAIndex + 1
    endloop
endfunction

//===========================================================================
function InitTrig_thunder takes nothing returns nothing
    set gg_trg_thunder = CreateTrigger(  )
    call DisableTrigger( gg_trg_thunder )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_thunder, EVENT_PLAYER_UNIT_SPELL_CAST )
    call TriggerAddCondition( gg_trg_thunder, Condition( function Trig_thunder_Conditions ) )
    call TriggerAddAction( gg_trg_thunder, function Trig_thunder_Actions )
endfunction




他说第48行即call UnitDamageTargetBJ( GetTriggerUnit(), udg_thunderaim, ( 20.00 * I2R(udg_thunderlv) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC )中有无效的变量数字。。?为什么?
发表于 2008-6-3 11:00:59 | 显示全部楼层
它提示 的 行数 不正确
其实是 你  AddLightningLoc 函数 参数 加错了  
function AddLightningLoc takes string codeName, location where1, location where2 returns lightning
   
参数 应该 是 两个  location


AddLightningEx才是 用 x,y,z 坐标
native AddLightningEx               takes string codeName, boolean checkVisibility, real x1, real y1, real z1, real x2, real y2, real z2 returns lightning
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-22 03:46 , Processed in 0.065120 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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