找回密码
 点一下
查看: 941|回复: 7

Jass代码出错了

[复制链接]
发表于 2009-12-10 18:37:11 | 显示全部楼层 |阅读模式
function Sapphiron_Filter takes nothing returns boolean

    local timer   SrTimer = GetExpiredTimer ()
    local unit    caster  = GetHandleUnit   (SrTimer,"caster")  //这里就是出错的位置
    local group   targets = GetHandleGroup  (SrTimer,"targets")
    local player  owner   = GetOwningPlayer (caster)
    local unit    targ    = GetFilterUnit   ()

    if IsUnitInGroup (targ,targets) then
        set SrTimer = null
        set caster  = null
        set owner   = null
        set targ    = null
        set targets = null
        return false
    endif

    if                   GetUnitAbilityLevel (targ,Sapphiron_DRawcode())      <= 0     then
        if               GetWidgetLife       (targ)                           >  0.405 then
            if           IsUnitEnemy         (targ,owner)                              then
                if       IsUnitType          (targ,UNIT_TYPE_STRUCTURE)       == false then
                    if   Sapphiron_Ultimate  ()                                        then
                        set SrTimer = null
                        set caster  = null
                        set targ    = null
                        set targets = null
                        set owner   = null
                        return true
                    endif
                        if   IsUnitType      (targ,UNIT_TYPE_MAGIC_IMMUNE)    == false then
                        set SrTimer = null
                        set caster  = null
                        set targ    = null
                        set targets = null
                        set owner   = null
                        return true
                    endif
                endif
            endif
        endif
    endif

    set SrTimer = null
    set caster  = null
    set owner   = null
    set targ    = null
    set targets = null
    return false

endfunction

那位知道上面出错的原因?
发表于 2009-12-10 18:39:03 | 显示全部楼层
请lz在发帖之前认真地阅读版规,如果在疑难区发帖请严格遵循版规,谢谢

GetHandleUnit是什么?cj和bj中都不包含这样的函数
回复

使用道具 举报

 楼主| 发表于 2009-12-10 18:52:23 | 显示全部楼层
我要知道就好了,这个是强大的龙系魔法,我游戏中的龙法师正需要的。
看来得找Trigger版做了。
回复

使用道具 举报

发表于 2009-12-10 18:55:13 | 显示全部楼层
你复制代码连做什么都不知道那你复制来干什么………………
先去找一下你复制源有没有这个函数,这也需要复制过来的
我是很不推荐用复制粘帖这种方法来引入其他地方的资源的,最好还是看懂后自己去写,否则问题会很多的
如果你连jass的基础都没有,那么请你先去学习jass的基础知识
回复

使用道具 举报

发表于 2009-12-10 18:59:13 | 显示全部楼层
LZ是直接移植了地图中的技能的Jass代码了吧

那你需要把原地图中的地图“自定义代码”那个地方的代码也移植过来。
就是触发编辑器左边的写着地图名字的图标
点开它,再把右边的所有代码也移植到你的地图的相应的地方。
回复

使用道具 举报

 楼主| 发表于 2009-12-10 19:04:06 | 显示全部楼层
要是有时间,我也会去学习Jass的,只是要到春节了,没时间了,图都快完成了,不会为了1 2个Jass的技能去学习的,大部分的好技能还是Trigger版本的,只要修改下就可以达到自己的效果。
只是这个技能比较重要而已,龙法师没龙系魔法好可悲,上次那个双系魔法,是给元素师添加的,
3 4系复合魔法都有了,就差个2系控制技能了。
回复

使用道具 举报

 楼主| 发表于 2009-12-10 19:06:59 | 显示全部楼层

回 4楼(血戮魔动冰) 的帖子

果然上面还有一段代码,居然没看到。
回复

使用道具 举报

发表于 2010-1-11 13:55:01 | 显示全部楼层
应该 是你没反gamecache 初始化 所以那个变量为未赋值
所以你去调 用他就会出现ERROR MESSAGEBOX   游戏当掉
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-7-22 08:24 , Processed in 0.057190 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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