Jump to content

mod crashes on starting world


Recommended Posts

this is a character mod- i got everything else to work but the game crashes on world load. i can pick him as a character (though his textures arent done yet) but thats as far as i can get. once i press start it lags for a bit then crashes. this is my first mod so im not sure how to fix it/if there would be a crash report anywhere?

Link to comment
Share on other sites

Nope, you fixed it by punching it in the face :D

It (probably) started as

	ANNOUNCE_EAT =
	{
		GENERIC = 
		PAINFUL = "Ugh. I don't feel good.",
		SPOILED = "Oh god- I think it was rotten.",
		STALE = "Eugh. Stale.",
		INVALID = "That's not edible.",
		YUCKY = "Who do you think I am?",
	},

...missing the entry for GENERIC, and also the comma denoting the end of the entry. That won't work.

Then you changed it to this, trying to follow my instructions (which were lacking, I admit)

	ANNOUNCE_EAT =
	}
	{
		GENERIC = 
		PAINFUL = "Ugh. I don't feel good.",
		SPOILED = "Oh god- I think it was rotten.",
		STALE = "Eugh. Stale.",
		INVALID = "That's not edible.",
		YUCKY = "Who do you think I am?",
	},

That doesn't follow the syntax at all. Syntax is everything when scripting and coding.

When comparing your file to the Wilson speech file, this is what it's supposed to be

	ANNOUNCE_EAT =
	{
		GENERIC = "Yum!",
		PAINFUL = "Ugh. I don't feel good.",
		SPOILED = "Oh god- I think it was rotten.",
		STALE = "Eugh. Stale.",
		INVALID = "That's not edible.",
		YUCKY = "Who do you think I am?",
	},

 

Link to comment
Share on other sites

@Ultroman i changed that and its showing the error again BUT its not crashing on world load when i change him to use a different speech file which is good. i probably shouldve learned code before starting this i guess it isnt something to wing lol

image.png

 

nope wait its back at it. i think maxwell specifically wants me dead

Link to comment
Share on other sites

That looks correct. Are you by any chance editing files for a mod you've already uploaded to the workshop? If so, it might be overwriting your files over an over, when you start the game.

Either way, that error usually means you have a misplaced bracket somewhere. It is imperative that there is the same number of opening and closing brackets, and that they are enclosing the right lines. It is also imperative that the commas are in place (you can see in wilsons speech file how they're supposed to be placed). I've tried going over the file manually a bit, but I can't find any problems. There's nothing for it. You'll have to go blind going through every single line in your speech file, to make sure that all the opening brackets have closing brackets, and that the lines have commas where appropriate. I know it's a big job, but I can't find any problems in the vicinity of the line it is reporting.

The file you posted looks correct. Are you absolutely sure that that is the file currently placed in your mod folder under the game folder?

Link to comment
Share on other sites

  • Developer

FYI, I just ran this file with a regular Lua interpreter to isolate the issue. It complained at line 1878, suggesting the issue may be at 1877, as it was. I just noticed that 1878 was missing it too. Luck of the draw.

Glad it works!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...