找回密码
 点一下
查看: 2920|回复: 19

这样的语法竟然是错误的?![已解决]

[复制链接]
发表于 2009-3-12 16:41:19 | 显示全部楼层 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2009-3-12 16:45:45 | 显示全部楼层
你把local integer XXXX移到上面去。
所有的局部变量(local values)
全部都在在函数头下、函数体上。
回复

使用道具 举报

 楼主| 发表于 2009-3-12 16:51:58 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

发表于 2009-3-12 17:13:56 | 显示全部楼层
回LS,不能。
你只能通过local来声明局部变量。
回复

使用道具 举报

 楼主| 发表于 2009-3-12 17:18:38 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

发表于 2009-3-12 17:39:58 | 显示全部楼层
可以先申明,后赋值啊,反正之前用不到,申明完留着不动就好了
另外我没看到call……

[codes=jass]function XXXXX takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer XXXX
call DisplayTextToPlayer(GetLocalPlayer(),0,0,"test1")
set XXXX=1
call DisplayTextToPlayer(GetLocalPlayer(),0,0,"test2")
set XXXX=null
return false
endfunction[/codes]

另外integer不需要设null
回复

使用道具 举报

发表于 2009-3-12 17:42:58 | 显示全部楼层
直接帮你改了:
[codes=jass]function XXXXX takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer XXXX = 0
call DisplayTextToPlayer(GetLocalPlayer(),0,0,"test1")
set XXXX=1
call DisplayTextToPlayer(GetLocalPlayer(),0,0,"test2")
set XXXX=0
set t = null//在函数返回前请清空handle/code类型变量,否则泄露
return false
endfunction[/codes]
回复

使用道具 举报

 楼主| 发表于 2009-3-12 17:46:20 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

发表于 2009-3-12 17:49:48 | 显示全部楼层
把你的JASS代码放在codes=jass和/codes中间
但是要在codes=jass和/codes前后加[]。
你可以改你的帖子试试看~~
回复

使用道具 举报

发表于 2009-3-12 17:50:05 | 显示全部楼层
[codes=jass]
回复

使用道具 举报

 楼主| 发表于 2009-3-12 17:55:07 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

发表于 2009-3-12 20:57:38 | 显示全部楼层
[jass]
[/jass]

这样也是可以的
回复

使用道具 举报

发表于 2009-3-13 12:09:06 | 显示全部楼层
楼主仿佛是有底子的嘛,最近作图招人请联系qq366017990
回复

使用道具 举报

发表于 2009-3-13 12:34:23 | 显示全部楼层
楼上 每个论坛我都发现你在招苦力
回复

使用道具 举报

发表于 2009-3-14 17:58:54 | 显示全部楼层
做张极品地图是要很多人力的呀
回复

使用道具 举报

发表于 2009-3-14 18:41:19 | 显示全部楼层
先放出点半成品让人看了有信心再招人吧~
回复

使用道具 举报

发表于 2009-3-14 23:39:40 | 显示全部楼层
等我做出半成品估计就不需要招人了。。
回复

使用道具 举报

发表于 2009-3-15 07:02:57 | 显示全部楼层
强强又在拉客了^
回复

使用道具 举报

发表于 2009-3-15 12:38:19 | 显示全部楼层
楼上谁呀?
回复

使用道具 举报

发表于 2009-3-16 17:10:29 | 显示全部楼层
请勿乱灌水
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-6 01:40 , Processed in 0.044605 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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