找回密码
 点一下
查看: 1609|回复: 2

求助-一个技能

[复制链接]
发表于 2007-3-19 14:40:01 | 显示全部楼层 |阅读模式
function Trig_B_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'AHtc' ) ) then
        return false
    endif
    return true
endfunction

function Trig_B_Actions takes nothing returns nothing
    local unit T_unit = GetSpellAbilityUnit()
    local location P_T_unit = GetUnitLoc(GetSpellAbilityUnit())
    local integer LV = GetUnitAbilityLevelSwapped('AHtc', GetSpellAbilityUnit())
    local array location P_random
    local array unit crearunit
    local rect creatarea = RectFromCenterSizeBJ(P_T_unit, 800.00, 800.00)
    call TriggerSleepAction( 1.20 )
    set bj_forLoopAIndex = 1
    set bj_forLoopAIndexEnd = ( LV * 2 )
    loop
        exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
        set P_random[GetForLoopIndexA()] = GetRandomLocInRect(creatarea)
        call CreateNUnitsAtLoc( 1, 'h00R', GetOwningPlayer(T_unit), P_random[GetForLoopIndexA()], bj_UNIT_FACING )
        set crearunit[GetForLoopIndexA()] = GetLastCreatedUnit()
        call UnitApplyTimedLifeBJ( 3.00, 'BHwe', crearunit[GetForLoopIndexA()] )
        call UnitAddAbilityBJ( 'AHtc', udg_UNITA[GetForLoopIndexA()] )
        call IssueImmediateOrder( crearunit[GetForLoopIndexA()], "thunderclap" )
        call RemoveLocation( P_random[GetForLoopIndexA()] )
        set bj_forLoopAIndex = bj_forLoopAIndex + 1
    endloop
    call RemoveRect( creatarea )
    call RemoveLocation( uP_random )
endfunction

//===========================================================================
function InitTrig_B takes nothing returns nothing
    set gg_trg_B = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_B, EVENT_PLAYER_UNIT_SPELL_CAST )
    call TriggerAddCondition( gg_trg_B, Condition( function Trig_B_Conditions ) )
    call TriggerAddAction( gg_trg_B, function Trig_B_Actions )
endfunction



这段JASS错误怎么这么多啊?  我看了好9不知道怎么回事呢
求教~``
发表于 2007-3-19 15:07:59 | 显示全部楼层
local array location P_random
    local array unit crearunit

array必须写在类型后面

local location array P_random


而且上面声明的是P_random~~下面却出现一个uP_random而且还不是数组~~
回复

使用道具 举报

 楼主| 发表于 2007-3-19 18:11:05 | 显示全部楼层
~~~~~
多谢MD殿下
我竟犯的这种错误~~~~
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-13 07:14 , Processed in 0.034108 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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