Jump to content

Recommended Posts

So, i'm making a mod that has tuning.lua tweaks in it, and I THINK that the way i'm trying to change the value setup for shadow eyes is causing a crash.

TUNING.CREEPY_EYES = 		{		    {maxsanity=.9, maxeyes=0},			{maxsanity=.8, maxeyes=2},		    {maxsanity=.7, maxeyes=4},			{maxsanity=.6, maxeyes=5},		    {maxsanity=.4, maxeyes=4},		    {maxsanity=.2, maxeyes=6},			{maxsanity=.1, maxeyes=16},		},

On the next code line down, I get an "Unexpected symbol near '=' " error.

Link to comment
https://forums.kleientertainment.com/forums/topic/36626-tuninglua-creepy-eyes/
Share on other sites

So, i'm making a mod that has tuning.lua tweaks in it, and I THINK that the way i'm trying to change the value setup for shadow eyes is causing a crash.

TUNING.CREEPY_EYES = 		{		    {maxsanity=.9, maxeyes=0},			{maxsanity=.8, maxeyes=2},		    {maxsanity=.7, maxeyes=4},			{maxsanity=.6, maxeyes=5},		    {maxsanity=.4, maxeyes=4},		    {maxsanity=.2, maxeyes=6},			{maxsanity=.1, maxeyes=16},		},

On the next code line down, I get an "Unexpected symbol near '=' " error.

Try to make something like:

TUNING.CREEPY_EYES.maxsanity = .6 

and so on with other variables in that table.

total_day_time is not a global variable. You need to use TUNING.TOTAL_DAY_TIME instead.

EDIT: Also, removing that comma after the last } would have solved the first crash. That trailing comma is only allowed when setting keys inside a table definition.

 

-- crashtbl = {  key = true,},-- no crashtbl = {  key = true,}
Edited by squeek

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
×
  • Create New...