Author Topic: ADD_SPELL "Couldn't add [...] to spell.ids as no slots remain"  (Read 1459 times)

Offline agb1

  • Planewalker
  • *****
  • Posts: 30
Apologies if this has been discussed already.  I found a thread regarding ADD_SPELL "no slots" and SPIN spells here http://forums.pocketplane.net/index.php?topic=29433.0 but I am reporting a different issue.

More details here:  http://www.shsforums.net/topic/56752-the-official-bwp-fixpack-thread/?p=586876

Briefly, unless I've missed something else in the Divine Remix code, it seems that calling ADD_SPELL to modify a pre-existing IDS entry causes that entry to be deleted if the "no slots remain" error occurs.

Edit:  also, I would like to second the request from the other thread for the "no slots remain" error to at least result in the component being INSTALLED WITH WARNINGS instead of SUCCESSFULLY INSTALLED.
« Last Edit: February 07, 2016, 08:22:36 PM by agb1 »

Offline Mike1072

  • Planewalker
  • *****
  • Posts: 296
  • Gender: Male
Re: ADD_SPELL "Couldn't add [...] to spell.ids as no slots remain"
« Reply #1 on: February 07, 2016, 08:25:06 PM »
My plan for updating the ADD_SPELL code was to FAIL the installation if no slots are available.  That should fix the issue, in a way.
« Last Edit: February 08, 2016, 01:12:28 AM by Mike1072 »

Offline agb1

  • Planewalker
  • *****
  • Posts: 30
Re: ADD_SPELL "Couldn't add [...] to spell.ids as no slots remain"
« Reply #2 on: February 07, 2016, 08:56:40 PM »
Is there a way to check if there are available slots before calling ADD_SPELL?

Also, in the particular case of replacing an existing slot, shouldn't it always succeed?

Offline Mike1072

  • Planewalker
  • *****
  • Posts: 296
  • Gender: Male
Re: ADD_SPELL "Couldn't add [...] to spell.ids as no slots remain"
« Reply #3 on: February 08, 2016, 12:53:31 AM »
There's no way to check beforehand whether ADD_SPELL will fail or not (unless you replicate the code it uses), but you will be able to use an ACTION_TRY statement around the ADD_SPELL which will let you catch errors and do something other than failing the installation.

I'd have to have more details on what you mean about replacing an existing slot.
« Last Edit: February 08, 2016, 01:15:56 AM by Mike1072 »

Offline agb1

  • Planewalker
  • *****
  • Posts: 30
Re: ADD_SPELL "Couldn't add [...] to spell.ids as no slots remain"
« Reply #4 on: February 08, 2016, 12:59:40 AM »
An example - Divine Remix component 11 tries to ADD_SPELL to update an existing IDS entry - CLERIC_NEGATIVE_PLANE_PROTECTION, in this case to change its spell level.

This failed in my install with the "no slots remaining" error, and the result was that IDS entry was removed from spell.ids.  I do not think ADD_SPELL should delete the IDS entry in this situation.

Offline Mike1072

  • Planewalker
  • *****
  • Posts: 296
  • Gender: Male
Re: ADD_SPELL "Couldn't add [...] to spell.ids as no slots remain"
« Reply #5 on: February 08, 2016, 01:11:50 AM »
If it changes the spell level, that means finding a new slot for the spell.  The spell slots are based on the filename, not the identifier.  If CLERIC_NEGATIVE_PLANE_PROTECTION was SPPR504 and you used ADD_SPELL to add it at level 6, it would need to be given a level 6 spell slot (e.g. SPPR630).

When I update the code, I'll make sure it won't make any changes to spell.ids if it's going to fail because of no spell slots remaining.
« Last Edit: February 08, 2016, 01:15:16 AM by Mike1072 »

Offline agb1

  • Planewalker
  • *****
  • Posts: 30
Re: ADD_SPELL "Couldn't add [...] to spell.ids as no slots remain"
« Reply #6 on: February 08, 2016, 07:41:44 AM »
That should work.  Thanks!

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: