找回密码
 点一下
查看: 1929|回复: 8

标识符重新声明:TU

[复制链接]
发表于 2011-4-19 12:08:45 | 显示全部楼层 |阅读模式
标识符重新声明:TU 是什么意思啊?
360安全浏览器截图2187243.jpg
发表于 2011-4-19 12:22:29 | 显示全部楼层
重复声明了
你有一个参数叫TU,就不能再有局部变量也叫TU,其他变量也一样

而且完全无必要再声明变量吧,你要用的不就是参数么
回复

使用道具 举报

 楼主| 发表于 2011-4-19 17:51:10 | 显示全部楼层
除了那个函数以外就没有其他的地方有TU了啊?
还是把我的J发上来算了...
[jass]
function wudizhan2_Conditions takes nothing returns boolean
    if ( not ( ianjishu > 0 ) ) then
        return false
    endif
    return true
endfunction
function wudizhan2_Func002Func006002003001 takes nothing returns boolean
    return ( IsUnitAliveBJ(TU) == true )
endfunction
function wudizhan2_Func002Func006002003002001 takes nothing returns boolean
    return ( IsUnitAlly(GetFilterUnit(), GetOwningPlayer(TU)) == false )
endfunction
function wudizhan2_Func002Func006002003002002 takes nothing returns boolean
    return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function wudizhan2_Func002Func006002003002 takes nothing returns boolean
    return GetBooleanAnd( wudizhan2_Func002Func006002003002001(), wudizhan2_Func002Func006002003002002() )
endfunction
function wudizhan2_Func002Func006002003 takes nothing returns boolean
    return GetBooleanAnd( wudizhan2_Func002Func006002003001(), wudizhan2_Func002Func006002003002() )
endfunction
function wudizhan2_Func002Func007A takes nothing returns nothing
    set SU = GetEnumUnit()
endfunction
function wudizhan2_Func002Func008Func002C takes nothing returns boolean
    if ( ( lianjishu <= 0 ) ) then
        return true
    endif
    if ( ( IsUnitDeadBJ(SU) == true ) ) then
        return true
    endif
    return false
endfunction
function wudizhan2_Func002Func008C takes nothing returns boolean
    if ( not wudizhan2_Func002Func008Func002C() ) then
        return false
    endif
    return true
endfunction
function wudizhan2_Func002C takes nothing returns boolean
    if ( not ( lianjishu <= 0 ) ) then
        return false
    endif
    return true
endfunction
function wudizhan2 takes unit TU, unit SU, integer lianjishu, effect TX returns nothing
    local unit TU
    local unit SU
    local integer lianjishu
    local group xuqudanwei
    local effect TX
    set lianjishu = ( lianjishu - 1 )
    if ( wudizhan2_Func002C() ) then
        call SelectUnitForPlayerSingle( TU, GetOwningPlayer(TU) )
        call SetUnitInvulnerable( TU, false )
        call SetUnitVertexColorBJ( TU, 100, 100, 100, 0 )
        call DestroyEffect( TX )
    else
        set xuanqudanwei = GetUnitsInRangeOfLocMatching(600.00, GetUnitLoc(TU), Condition(function wudizhan2_Func002Func006002003))
        call ForGroupBJ( GetRandomSubGroup(1, xuanqudanwei), function wudizhan2_Func002Func007A )
        if ( wudizhan2_Func002Func008C() ) then
            call SelectUnitForPlayerSingle( TU, GetOwningPlayer(TU) )
            call SetUnitInvulnerable( TU, false )
            call SetUnitVertexColorBJ( TU, 100, 100, 100, 0 )
            call DestroyEffect( TX )
        else
            call SetUnitPositionLocFacingBJ( TU, GetUnitLoc(SU), GetRandomDirectionDeg() )
            call DestroyEffect( AddSpecialEffectTarget("Abilities\\\\Spells\\\\NightElf\\\\Blink\\\\BlinkCaster.mdl", TU "overhead") )
            call UnitDamageTargetBJ( TU, SU, GetRandomReal(150.00, 250.00), ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL )
            call IssueTargetOrder( TU, "attack", SU )
            call PolledWait( 0.3)
            call GroupClear( xuqudanwei )
            call wudizhan2(TU,SU,lianjishu,TX)
        endif
    endif
    call GroupClear( xuqudanwei )
endfunction
[/jass]
回复

使用道具 举报

发表于 2011-4-19 18:29:09 | 显示全部楼层
你参数里面不是有个SU和一个TU了么。。。。。。
回复

使用道具 举报

 楼主| 发表于 2011-4-20 12:16:17 | 显示全部楼层
这样就不用 local了???
回复

使用道具 举报

发表于 2011-4-20 20:29:32 | 显示全部楼层
是的
回复

使用道具 举报

 楼主| 发表于 2011-4-21 11:49:02 | 显示全部楼层
好的,问题又来了
360安全浏览器截图1065705.jpg
回复

使用道具 举报

发表于 2011-4-21 16:32:43 | 显示全部楼层
call DestroyEffect( AddSpecialEffectTarget("Abilities\\\\Spells\\\\NightElf\\\\Blink\\\\BlinkCaster.mdl", TU "overhead")

TU后少个逗号
回复

使用道具 举报

 楼主| 发表于 2011-4-22 19:00:43 | 显示全部楼层
额,谢谢
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-4 06:23 , Processed in 0.079400 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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