幻想森林

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 2239|回复: 2

[KR] 求助!日期设定不断报错!

[复制链接]

32

主题

114

帖子

1148

积分

⑥精研

积分
1148
发表于 2009-6-28 21:19:19 | 显示全部楼层 |阅读模式
我为了设定日期而参照教程写了下面的式子。
但是一运行到这里就报错,怎么修改也没用……
我也不知道错在哪里,麻烦大人们指教……

[macro name=增加1天]
[eval exp="f.日=f.日+1"]
[eval exp="f.周=f.周+1"]
[if exp="(f.月 == 1 && exp=f.日 > 31)"]
[eval exp="f.日=f.日-31"][eval exp="f.月=f.月+1"]
[endif]
[if exp="(f.月 == 2 && exp=f.日 > 28)"]
[eval exp="f.日=f.日-28"][eval exp="f.月=f.月+1"]
[endif]
[if exp="(f.月 == 3 && exp=f.日 > 31)"]
[eval exp="f.日=f.日-31"][eval exp="f.月=f.月+1"]
[endif]
[if exp="(f.月 == 4 && exp=f.日 > 30)"]
[eval exp="f.日=f.日-30"][eval exp="f.月=f.月+1"]
[endif]
[if exp="(f.月 == 5 && exp=f.日 > 31)"]
[eval exp="f.日=f.日-31"][eval exp="f.月=f.月+1"]
[endif]
[if exp="(f.月 == 6 && exp=f.日 > 30)"]
[eval exp="f.日=f.日-30"][eval exp="f.月=f.月+1"]
[endif]
[if exp="(f.月 == 7 && exp=f.日 > 31)"]
[eval exp="f.日=f.日-31"][eval exp="f.月=f.月+1"]
[endif]
[if exp="(f.月 == 8 && exp=f.日 > 31)"]
[eval exp="f.日=f.日-31"][eval exp="f.月=f.月+1"]
[endif]
[if exp="(f.月 == 9 && exp=f.日 > 30)"]
[eval exp="f.日=f.日-30"][eval exp="f.月=f.月+1"]
[endif]
[if exp="(f.月 == 10 && exp=f.日 > 31)"]
[eval exp="f.日=f.日-31"][eval exp="f.月=f.月+1"]
[endif]
[if exp="(f.月 == 11 && exp=f.日 > 30)"]
[eval exp="f.日=f.日-30"][eval exp="f.月=f.月+1"]
[endif]
[if exp="(f.月 == 12 && exp=f.日 > 31)"]
[eval exp="f.日=f.日-31"][eval exp="f.月=f.月-11"]
[eval exp="f.年=f.年+1"]
[endif]
[if exp="f.周 > 7"]
[eval exp="f.周=f.周-7"]
[endif]
[if exp="f.周 == 1"]
[eval exp="f.星期='一'"]
[endif]
[if exp="f.周 == 2"]
[eval exp="f.星期='二'"]
[endif]
[if exp="f.周 == 3"]
[eval exp="f.星期='三'"]
[endif]
[if exp="f.周 == 4"]
[eval exp="f.星期='四'"]
[endif]
[if exp="f.周 == 5"]
[eval exp="f.星期='五'"]
[endif]
[if exp="f.周 == 6"]
[eval exp="f.星期='六'"]
[endif]
[if exp="f.周 == 7"]
[eval exp="f.星期='日'"]
[endif]
[endmacro]
回复

使用道具 举报

122

主题

3954

帖子

24万

积分

超级版主

传说中的Bunny坑神~!

Rank: 8Rank: 8

积分
244543

声命组铜赏

发表于 2009-6-28 22:22:37 | 显示全部楼层
[if exp="(f.月 == 1 && exp=f.日 > 31)"]

后面那个根本就不需要exp=啦...语法都错了不报才怪......................
[if exp="f.月==1 && f.日>31"]
就够了.
http://www.nvlmaker.net/
回复 支持 反对

使用道具 举报

32

主题

114

帖子

1148

积分

⑥精研

积分
1148
 楼主| 发表于 2009-6-29 09:09:21 | 显示全部楼层
原来如此.......

多谢指教.......

我果然是赶鸭子上架的超级编程废柴啊.........

无论如何大人你真是太亲切了.......

一次次的帮助我,好感动,555555555555..........
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|幻想森林

GMT+8, 2024-3-29 05:05 , Processed in 0.024236 second(s), 21 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

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