Hadeszeus 15 Posted May 26, 2014 (edited) LAST UPDATED BY ANNIE http://rathena.org/board/pastebin/4ryaa5wz3bu1/txt/ On the script from the link above I'm getting the following error. [Error]: script error in file '(DIRECT INPUT)' line 1121 column 15 parse_simpleexpr: unmatched ')' 1118: end; 1119: 1120: OnCommand: * 1121: if ( !strcmp(strnpcinfo(0), .npc_name$) ) { ~~~~~~~~~~~~~~~~~~~~~^ 1122: if ( @ms_size ) { 1123: for ( .@i = 0; .@i < @ms_size; .@i++ ) { 1124: .@mob_size = getarraysize( getd( "@ms_"+ @ms_list$[.@i] +"_list" ) ); I search strcmp in script_command but it doesn't exist. ALSO getserverdef( VAR_MAX_LEVEL ); seems not compatible with hercules. [Error]: script error in file '(DIRECT INPUT)' line 1019 column 36 parse_line: expect command, missing function name or calling undeclared function 1016: 1017: // predefined values. 1018: .npc_name$ = strnpcinfo(0); * 1019: .server_max_level = getserverdef( VAR_MAX_LEVEL ); PLEASE help Edited May 26, 2014 by Hadeszeus Quote Share this post Link to post Share on other sites
0 Dastgir 1246 Posted May 26, 2014 Change Following Things:(I have not seen script, but just saw your error in console) - if ( !strcmp(strnpcinfo(0), .npc_name$) ) {+ if ( .npc_name$ == strnpcinfo(0) ) { - .server_max_level = getserverdef( VAR_MAX_LEVEL ); + .server_max_level = MAX_LEVEL; THank you. I search wiki of rathena and it seems strcmp is compare in hercules. is this correct? I'll try the fix thanks again. in rA, strcmp: *strcmp("<string>","<string>")This command compares two strings are returns a value: 1: string 1 > string 2 0: strings are equal -1: string 1 < string 2 and in the script, it checks for 0, so we can directly compare . and about getserverdef, we have it other way round, we directly define constant : https://github.com/HerculesWS/Hercules/commit/950e3ebcdbbde96b090fa681ce88ecf4069f2f64 (Implemented in this commit) 1 Hadeszeus reacted to this Quote Share this post Link to post Share on other sites
0 Dastgir 1246 Posted May 26, 2014 Change Following Things:(I have not seen script, but just saw your error in console) - if ( !strcmp(strnpcinfo(0), .npc_name$) ) {+ if ( .npc_name$ == strnpcinfo(0) ) { - .server_max_level = getserverdef( VAR_MAX_LEVEL ); + .server_max_level = MAX_LEVEL; Quote Share this post Link to post Share on other sites
0 Hadeszeus 15 Posted May 26, 2014 Change Following Things:(I have not seen script, but just saw your error in console) - if ( !strcmp(strnpcinfo(0), .npc_name$) ) {+ if ( .npc_name$ == strnpcinfo(0) ) { - .server_max_level = getserverdef( VAR_MAX_LEVEL ); + .server_max_level = MAX_LEVEL; THank you. I search wiki of rathena and it seems strcmp is compare in hercules. is this correct? I'll try the fix thanks again. Quote Share this post Link to post Share on other sites
0 Hadeszeus 15 Posted May 26, 2014 Many thanks Sir. Quote Share this post Link to post Share on other sites
0 Chatterboy 8 Posted April 28, 2015 Thanx for the info guyz! Quote Share this post Link to post Share on other sites
On the script from the link above I'm getting the following error.
I search strcmp in script_command but it doesn't exist.
ALSO getserverdef( VAR_MAX_LEVEL ); seems not compatible with hercules.
PLEASE help
Edited by HadeszeusShare this post
Link to post
Share on other sites