找回密码
 点一下
查看: 1256|回复: 3

jass_问题1已解决.看问题2,关于boolean的写法.

[复制链接]
发表于 2008-11-22 20:29:16 | 显示全部楼层 |阅读模式
问题1:[codes=jass]set ua = CreateUnit(GetOwningPlayer(u),'n00I',lx,ly),0.00)[/codes]这句错?无效的变量数字类型?]


问题2.[codes=jass]
function Trig_001_Func002C takes nothing returns boolean
    if ( not ( ***) ) then
        return false
    endif
    if ( not (***) ) then
        return false
    endif
    return true
endfunction

function Trig_001_Actions takes nothing returns nothing
    if ( Trig_001_Func002C() ) then
    else
    endif
endfunction
//========分割线=========
function Trig_002_Actions takes nothing returns nothing
    if ( not ( ***) ) then
    if ( not (***) ) then
    endif
    endif
endfunction[/codes]上面2种写法哪个好?
发表于 2008-11-22 20:44:12 | 显示全部楼层
啊呀呀,看下括号吧………………
回复

使用道具 举报

 楼主| 发表于 2008-11-22 20:49:49 | 显示全部楼层
看来是我有问题了.居然不知道多了个),,我用语法查过的.可是那里说的是E文......解决了,晕死.
回复

使用道具 举报

发表于 2008-11-22 21:27:43 | 显示全部楼层
一般我会写
[codes=jass]function Trig_002_Actions takes nothing returns nothing
      if ( ***) and (***) then
      endif
endfunction[/codes]
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-7-21 10:26 , Processed in 0.082756 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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