Jump to content

Question

Hello everybody.

I am having this error in the mercenary_rent.txt script is something strange for me that I have never had this error.
I would like to ask for this help so I can solve it and if someone else also has the same error, solve it too.
Thanks in advance.
The error is below.

[Error]: script:getd: `SPEAR_MERC_GUILD` is already used by something that is not a variable.
[Debug]: Source (NPC): Mercenary Manager#Spear at prontera (41,337)

It happens with the three variables

setarray .@faith$,     "SPEAR_MERC_GUILD",    "SWORD_MERC_GUILD",    "ARCH_MERC_GUILD";

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

ARCH_MERC_GUILD, SPEAR_MERC_GUILD and SWORD_MERC_GUILD are hardcoded constants, so you cannot use them as variable

Instead of doing something like this to get their values:

setarray(.@faith$, "SPEAR_MERC_GUILD", "SWORD_MERC_GUILD", "ARCH_MERC_GUILD");

...

getd(.@faith$[1])

Just use the plain constants:

setarray(.@faith, SPEAR_MERC_GUILD, SWORD_MERC_GUILD, ARCH_MERC_GUILD);

...

.@faith[1]

 

Share this post


Link to post
Share on other sites
  • 0

wow that's quite awkward then; we should definitely get rid of it

I'll open a PR to remove useless usages of getd

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.