Jump to content
  • 0
Hadeszeus

Mission Board updated by Annie

Question

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 by Hadeszeus

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

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)

Share this post


Link to post
Share on other sites
  • 0

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;

Share this post


Link to post
Share on other sites
  • 0

 

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.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.