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;

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
  • 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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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