Mission Board updated by Annie

Hadeszeus

New member
Messages
651
Points
0
Location
Philippines
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
default_sad.png


 
Last edited by a moderator:
Change Following Things:(I have not seen script, but just saw your error in console)

Code:
-    if ( !strcmp(strnpcinfo(0), .npc_name$) ) {+    if ( .npc_name$ == strnpcinfo(0) ) {
Code:
-        .server_max_level = getserverdef( VAR_MAX_LEVEL ); +        .server_max_level = MAX_LEVEL;
 
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) ) {
Code:
-        .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.

 
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) ) {
Code:
-        .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)

 
Last edited by a moderator:
Back
Top