|
char regidPram[50]; //保存取到的流水号
char regidPramVal[50]; //保存以"Value=流水号"取到的流水号
query()
{
web_submit_data("mobileCodeLevel.do_4",
"Action=http://172.16.5.232:6677/Omega/pages/mobile/mobileCodeLevel.do?doEvent=queryCodeLevelByQueryForm",
"Method=POST",
"Referer=http://172.16.5.232:6677/Omega/pages/mobile/codeLevelMain.jsp",
"Snapshot=t68.inf",
"Mode=HTTP",
ITEMDATA,
"Name=start", "Value=0", ENDITEM,
"Name=limit", "Value=20", ENDITEM,
"Name=qcName", "Value={levelname}", ENDITEM,
"Name=qcDescription", "Value=", ENDITEM,
LAST);
lr_think_time(2);
web_reg_save_param("regid",
"LB=1',id:'",
"RB=',descr",
"Ord=ALL",
"Search=Body",
"RelFrameId=1",
LAST);
return 0;
}
lr_message("regid:%s", lr_eval_string("{regid}") );
//打印出关联的参数regid的值。
sprintf( regidPram, "{regid_%s}",lr_eval_string("{regid_count}") );
//把取到流水号保存到regidPram里,具体形式为
sprintf( regidPramVal,"Value=%s",lr_eval_string(regidPram) );
//组合流水号和”Value=”并保存到regidPramVal变量中。
lr_message( "The value argument is : %s",regidPramVal );
//打印出字符串变量regidPramVal的值。
报错如下:
query.c (28): syntax error; found "regid:%s" expecting `)'
query.c (28): skipping "regid:%s" `,' `lr_eval_string' `(' "{regid}"
query.c (28): redeclaration of `lr_message' previously declared at C:\\Program Files\\Mercury Interactive\\Mercury LoadRunner\\include/lrun.h (496)
query.c (28): syntax error; found `)' expecting `;'
query.c (28): skipping `)'
query.c (30): expecting an identifier
query.c (30): syntax error; found "{regid_%s}" expecting `)'
query.c (30): skipping "{regid_%s}" `,' `lr_eval_string' `(' "{regid_count}"
query.c (30): extraneous old-style parameter list
query.c (30): syntax error; found `)' expecting `;'
query.c (30): skipping `)'
query.c (32): expecting an identifier
query.c (32): syntax error; found "Value=%s" expecting `)'
query.c (32): skipping "Value=%s" `,' `lr_eval_string' `(' `regidPram'
query.c (32): extraneous old-style parameter list
query.c (32): syntax error; found `)' expecting `;'
query.c (32): skipping `)'
query.c (34): syntax error; found "The value argument ... expecting `)'
query.c (34): skipping "The value argument ... `,' `regidPramVal'
c:\\documents and settings\\administrator\\local settings\\temp\\noname15\\\\combined_noname15.c (9): 19 errors, not writing pre_cci.ci
请各位大侠指教,很奇怪,这段代码一直用,之前一直很正常,这次的版本却出现这样的问题,郁闷啊!! |
|