|
lr打印当前月份的函数是 lr_save_datetime("%Y-%m", DATE_NOW,"NOW_YM"); ****2015-09
我想打印出下个月份****2015-10,但是调了大半天还是不行,请大神指点:
char *N_M;
lr_save_datetime("%Y", DATE_NOW,"Year");
lr_save_datetime("%m", DATE_NOW,"NOW_Mon");
sprintf(N_M,"{NOW_Mon_%d}",1); //将当前月份存到变量N_M里面
lr_save_string(N_M++,"NEXT_Mon"); //将变量N_M+1存到参数NEXT_Mon里面
lr_save_string(lr_eval_string("{Year}-{NEXT_Mon}"), "Ymd");
return 0;
报错如下:
Starting action Action.
Action.c(7): Warning: Invalid parameter detected in function.
Action.c(8): Error: C interpreter run time error: Action.c (8): Error -- memory violation : Exception ACCESS_VIOLATION received.
Action.c(8): Notify: CCI trace: Action.c(8): lr_save_string(0x00000000, 0x026b019f "NEXT_Mon")
.
Action.c(8): Notify: CCI trace: Compiled_code(0): Action()
.
Ending Vuser...
|
|