Page 1 of 1

Changing the name of multiple items?

Posted: Thu Feb 25, 2016 9:40 pm
by MagicalSpacePotato
So, i'm using this code to change the name of several items. The trouble is, how do i use it multiple times?

Whenever i paste the code with a different item, it says "duplicate identifier".

Re: Changing the name of multiple items?

Posted: Thu Feb 25, 2016 10:25 pm
by CommanderMark
That code's pretty insufficient to begin with. You should probably just rename every instance of the item's inventory name in the code.

Re: Changing the name of multiple items?

Posted: Thu Feb 25, 2016 10:36 pm
by juanjp600

Code: Select all

Function InvName$(inputName$)
   Select inputName
      Case "Item's original name"
         Return "Item's new name"
      Case "Second item's original name"
         Return "Second item's new name"
      Case "And so on"
         Return "Add more cases"
      Default
         Return inputName
   End Select
End Function

Re: Changing the name of multiple items?

Posted: Fri Feb 26, 2016 1:39 am
by MagicalSpacePotato
juanjpro wrote:

Code: Select all

Function InvName$(inputName$)
   Select inputName
      Case "Item's original name"
         Return "Item's new name"
      Case "Second item's original name"
         Return "Second item's new name"
      Case "And so on"
         Return "Add more cases"
      Default
         Return inputName
   End Select
End Function
Thank you.