Aller au contenu

Photo

Resource can not be saved -- StringIDs (solved, it seems)


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
Jonathan Seagull

Jonathan Seagull
  • Members
  • 418 messages
Hey all,

So I was working on some dialogue today and came across the "Resource can not be saved" error.  I know that it has to do with StringIDs and such, and I read the other threads I could find about it.  But I'm still confused about what the best solution is for my mod.

To be clear, I'm working on a custom companion add-in for the single player campaign.  I'm not currently trying to do any B2B stuff.  I was adding some new options to his main dialogue when I got the error.  According to the toolset logs, it's giving me errors both for "There are no unused StringIDs available in your module's range" and "Found duplicate string id, this should not happen."  I'm holding off on altering any properties, etc. because I'm very nervous about losing the work I've done.  Does anyone know the best fix for this issue?

Modifié par Jonathan Seagull, 21 décembre 2010 - 07:43 .


#2
Sunjammer

Sunjammer
  • Members
  • 925 messages
In your module's properties what are the values for StringID Begin, StringID End and StringID Last Used? Also did it tell you what ID numbers were causing you a problem?

#3
Jonathan Seagull

Jonathan Seagull
  • Members
  • 418 messages
Thanks for the reply!  Let's see...
StringID Begin is set to 729854884; StringID End is set to 729864884; and currently Last Used is 729864358.

As far as I can tell, the log doesn't show the StringIDs, but for the "no unused strings" error it does display the corresponding line of text.  I'm getting 16 of those errors.  One example in the log reads:

Sun Dec 19 14:54:50 2010, ERROR, ".\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ResourceIOBase.cpp", 756, "ResourceIOBase::WriteResourceInternal caught an exception: Unable to save to the database the resource ""isaac_meeting"" in campaign 5."
Sun Dec 19 14:54:50 2010, ERROR, ".\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\toolsoledb.cpp", 971, "Tools::DBTransaction::~Tools::DBTransaction: Abort failed."
Sun Dec 19 14:55:11 2010, ERROR, ".\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\dbstring.cpp", 267, "CDBString::Add caught an exception: Stored procedure bsp_AddString not successful. There are no unused StringIDs available in your module's range. http://social.biowar...x.php/Error_100"
Sun Dec 19 14:55:11 2010, ERROR, ".\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\toolsoledb.cpp", 971, "Tools::DBTransaction::~Tools::DBTransaction: Abort failed."
Sun Dec 19 14:55:11 2010, ERROR, ".\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\dbbase.cpp", 918, "CDBBase::Write caught an exception: Could Not add new String to DB.
Text: Good.  Healing magic will be a great asset to the team.
Description: "


As for the "duplicate string id" error, it doesn't seem to identify the lines in any way.  The errors read as:

Sun Dec 19 14:56:32 2010, ERROR, ".\\ResourceIOBase.cpp", 756, "ResourceIOBase::WriteResourceInternal caught an exception: Unable to save to the database the resource ""isaac_meeting"" in campaign 5."
Sun Dec 19 14:56:32 2010, ERROR, ".\\toolsoledb.cpp", 971, "Tools::DBTransaction::~Tools::DBTransaction: Abort failed."
Sun Dec 19 14:58:09 2010, ERROR, ".\\dbbase.cpp", 918, "CDBBase::Write caught an exception: Found duplicate string id, this should not happen."

The 3-digit numbers appear to be the same in error instance of the error.

EDIT:  Well, since the site helpfully pointed out that URL in the above log to me, is that really all I need to do?  Increase the value of StringID end to something higher?  And I can do that while my file is still open?  I guess I'll go ahead and try that.

EDIT THE SECOND:  Does that work for add-in modules?  I tried increasing it from 729864884 all the way up to 909864884 and I'm still getting the error.

Modifié par Jonathan Seagull, 20 décembre 2010 - 06:07 .


#4
Sunjammer

Sunjammer
  • Members
  • 925 messages
It's a bit odd because with your original settings you should have been fine - you're over the 610 million reserved range and you still had over 500 unused string ids left so unless you were saving a conversation that contained more lines that than then you shouldn't have had a problem (and that's assuming string ids are assigned at save/export rather than on creation).

I've had this issue myself with a new module before I set the string range and I try to add the string ids for the module name etc. However that is fixed simply by opening the module properties and setting the range. You've done this and it didn't help so logically we're looking for something else.

Have you imported anything from another module? Are you inheriting from another module (other than Core and Single Player)?

In your dialogue, which I assume is called "isaac_meeting" does the line "Good. Healing magic will be a great asset to the team." have a string id attached and if so what is it? If it has a number search your String Table for this: does it return the same line?. If it doesn't see if the line before it has and search your String Table for that number + 1: does that return anything?

Something you could try is cut and paste the offending line and all the lines beneath it into a new (temporary) conversation then try and save both the original and the temporary one. If this works you've not lost anything at least.

Modifié par Sunjammer, 20 décembre 2010 - 01:39 .


#5
Jonathan Seagull

Jonathan Seagull
  • Members
  • 418 messages
Yeah, it's confusing because I appear to be in the appropriate range (and I'm pretty certain I didn't even have a hundred new lines of text since the last save; maybe not even 50).



I'm also not importing from any other modules. In fact, I haven't even downloaded any other mods yet since I didn't want any conflicts while working. I have, however, duplicated several of the SP conversations to add to them.



I can check the String Table when I get home from work. How do I search that? It may be obvious when I open the toolset, but I figured I should go ahead and ask just to save time in case it's not. :-)

#6
Sunjammer

Sunjammer
  • Members
  • 925 messages
I was going to say "From the menu bar select Tools > String Editor and when it opens simply pop the number in the String ID box and hit return" but of course that only works if you've checked your conversation in.

If you have SQL Server Management Studio we can always query what's in the database.

Modifié par Sunjammer, 20 décembre 2010 - 06:54 .


#7
Jonathan Seagull

Jonathan Seagull
  • Members
  • 418 messages
I don't think I have Management Studio. I'm just going to suck it up and close out the conversation and see what happens after I've restarted the toolset and reopened it. I'm spending more time trying to avoid closing the toolset than it would take me to re-enter the dialogue anyway.  Posted Image

Oh, I had also tried saving some of the new lines to a different conversation, but that wouldn't save either. Also, I just noticed in the toolset that one of the lines seems to report and error twice in the toolset log. A lot of the lines giving errors are (as far as I can tell) indistinguishable from one another, but this one is unique, and it shows up twice. But it's definitely only in the conversation once.

Anyway, let's see what happens when I restart the toolset....

EDIT:  Okay, well, restarting seems to have worked.  I wonder if the toolset has to be restarted before a new StringID range can take effect?  Anyway, I think I've got at least most of the new dialogue re-entered, and it seems to be saving fine, so far at least.  Thanks for all your help!

Modifié par Jonathan Seagull, 21 décembre 2010 - 02:32 .