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

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.