Jump to content

On Character Scripts


Recommended Posts

1 minute ago, GetNerfedOn said:

So I've decided to alter an existing character mods' script; however, when i place the replacement speech lua back in the mod scripts folder, it causes my worldss to crash on startup. Any advice?

Give us a client_log
 

C:\Users\Username Here\Documents\Klei\DoNotStarveTogether\client_log.txt

 

Link to comment
Share on other sites

Just now, GetNerfedOn said:

sorry, that was a recent log for when i didn't crash the game

here:
client_log_2019-07-30-10-26-07.txt

[00:00:48]: error loading module 'speech_rosie' from file '../mods/workshop-1364735353\scripts\speech_rosie.lua':
	[string "cannot OLDFILEACCESSMETHOD @../mods/workshop-1364735353\scripts..."]:208: '}' expected (to close '{' at line 2) near 'ANNOUNCE_BECOMEGHOST'
LUA ERROR stack traceback:
        =[C] ?
        =[C] in function 'require'
        ../mods/workshop-1364735353/modmain.lua(98,1) in main chunk
        =[C] in function 'xpcall'
        scripts/util.lua(712,1) in function 'RunInEnvironment'
        scripts/mods.lua(514,1) in function 'InitializeModMain'
        scripts/mods.lua(488,1) in function 'LoadMods'
        scripts/main.lua(303,1) in function 'ModSafeStartup'
        scripts/main.lua(377,1)

Hm, I think you're missing a comma, may you show line 205-210?

Link to comment
Share on other sites

41 minutes ago, Hornete said:

snip!

 

36 minutes ago, Mobbstar said:

snip!

Now I've been trying to troubleshoot on my own now using the info that the log provided after every crash, and it seems a whole new host of errors popped up because i missed tons of brackets, when i added them (specifically at line 548 and 562) in I then came across this new error:

client_log.txt

if it helps, here's a copy of the script too:

speech_rosie.lua

Link to comment
Share on other sites

23 minutes ago, GetNerfedOn said:

 

Now I've been trying to troubleshoot on my own now using the info that the log provided after every crash, and it seems a whole new host of errors popped up because i missed tons of brackets, when i added them (specifically at line 548 and 562) in I then came across this new error:

client_log.txt

if it helps, here's a copy of the script too:

speech_rosie.lua

Try this, you put unnessacessary brackets.

speech_rosie.lua

Link to comment
Share on other sites

Now the script is seizing up here:

client_log.txt

This specific error telling me to close out a { on line two was vhat made me place all those other extra }, in the first place

Methinks i'll start over and carefully copypaste my work onto a working script template. seems i did a messy job with all my copypastes. Didn't know until now that every single comma and bracket mattered in coding... well, that's a lesson learnt, i guess :)

Thanks for all the help, guys!

Edited by GetNerfedOn
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...