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.

profitamole

mod crashes on starting world

Recommended Posts

profitamole    3

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?

Share this post


Link to post
Share on other sites
Ultroman    340

Grab your trusty Notepad++, open the offending LUA file, make sure to set "Language" to LUA, and then go to line 178 and check that the closing bracket for the opening bracket at line 178 is where it's supposed to be.

Share this post


Link to post
Share on other sites
Ultroman    340

Maybe not completely fixed, then :)

Drag'n'drop your log files onto a reply here. If you don't know where to find those, take a look at my newcomer post.

Share this post


Link to post
Share on other sites
profitamole    3

@Ultroman Ok! here it is (i think its the right one anyway i havent slept in 2 days working on this lol)

log.txt

i figured out how to get the error to stop showing with a dfferent script format but its still funky

Share this post


Link to post
Share on other sites
Ultroman    340

Still the same bug. I don't think you fixed it correctly the first time. Post me your speech file.

Share this post


Link to post
Share on other sites
Ultroman    340

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?",
	},

 

Share this post


Link to post
Share on other sites
profitamole    3

@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

Share this post


Link to post
Share on other sites
Ultroman    340

It's another related error, but on another line.

Let me see your new speech file.

Share this post


Link to post
Share on other sites
Ultroman    340

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?

Share this post


Link to post
Share on other sites
bizziboi    1,553

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!

Share this post


Link to post
Share on other sites
Ultroman    340
12 hours ago, bizziboi said:

FYI, I just ran this file with a regular Lua interpreter to isolate the issue.

Why didn't I think of that?

Share this post


Link to post
Share on other sites
bizziboi    1,553

For most files it would be trickier, because it relies on other files already being required. I just happened to realize that speech just returns a table.

Share this post


Link to post
Share on other sites