Silentdarkness1 Posted May 19, 2014 Share Posted May 19, 2014 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 More sharing options...
Silentdarkness1 Posted May 19, 2014 Author Share Posted May 19, 2014 [forum bug bump] Link to comment https://forums.kleientertainment.com/forums/topic/36626-tuninglua-creepy-eyes/#findComment-484343 Share on other sites More sharing options...
QQQQ Posted May 19, 2014 Share Posted May 19, 2014 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. Link to comment https://forums.kleientertainment.com/forums/topic/36626-tuninglua-creepy-eyes/#findComment-484344 Share on other sites More sharing options...
Silentdarkness1 Posted May 19, 2014 Author Share Posted May 19, 2014 I'm not quite sure how that'd work. There's two variables to worry about in each line of the table. Link to comment https://forums.kleientertainment.com/forums/topic/36626-tuninglua-creepy-eyes/#findComment-484348 Share on other sites More sharing options...
QQQQ Posted May 19, 2014 Share Posted May 19, 2014 I'm not quite sure how that'd work. There's two variables to worry about in each line of the table. You just edit all of them as shown above, so you have 2 lines of code for one line of the table. Link to comment https://forums.kleientertainment.com/forums/topic/36626-tuninglua-creepy-eyes/#findComment-484351 Share on other sites More sharing options...
QQQQ Posted May 19, 2014 Share Posted May 19, 2014 TUNING.CREEPY_EYES.maxsanity = .6TUNING.CREEPY_EYES.maxeyes = 999should work like that just fine Link to comment https://forums.kleientertainment.com/forums/topic/36626-tuninglua-creepy-eyes/#findComment-484354 Share on other sites More sharing options...
QQQQ Posted May 19, 2014 Share Posted May 19, 2014 TUNING.CREEPY_EYES[1].maxsanity = .6TUNING.CREEPY_EYES[1].maxeyes = 999now its correct, you must number the elemnet/line in hte table Link to comment https://forums.kleientertainment.com/forums/topic/36626-tuninglua-creepy-eyes/#findComment-484364 Share on other sites More sharing options...
squeek Posted May 19, 2014 Share Posted May 19, 2014 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}, },What's the last comma doing there? Link to comment https://forums.kleientertainment.com/forums/topic/36626-tuninglua-creepy-eyes/#findComment-484403 Share on other sites More sharing options...
Silentdarkness1 Posted May 20, 2014 Author Share Posted May 20, 2014 @squeek idk, that must've been my bad. But QQQQ's way solved the crash, so it's good, I think. Link to comment https://forums.kleientertainment.com/forums/topic/36626-tuninglua-creepy-eyes/#findComment-484446 Share on other sites More sharing options...
Silentdarkness1 Posted May 20, 2014 Author Share Posted May 20, 2014 @squeek Nope, getting a tuning.lua crash again. This time referring to use total_day_time as a value. Attempt to perform arithmetic on global "total_day_time" Link to comment https://forums.kleientertainment.com/forums/topic/36626-tuninglua-creepy-eyes/#findComment-484448 Share on other sites More sharing options...
Silentdarkness1 Posted May 20, 2014 Author Share Posted May 20, 2014 TUNING.UMBRELLA_PERISHTIME = total_day_time*18 Link to comment https://forums.kleientertainment.com/forums/topic/36626-tuninglua-creepy-eyes/#findComment-484449 Share on other sites More sharing options...
squeek Posted May 20, 2014 Share Posted May 20, 2014 (edited) 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 May 20, 2014 by squeek Link to comment https://forums.kleientertainment.com/forums/topic/36626-tuninglua-creepy-eyes/#findComment-484470 Share on other sites More sharing options...
Silentdarkness1 Posted May 20, 2014 Author Share Posted May 20, 2014 Thanks. And yet another crash though. Attempt to index field "?" (nil value) TUNING.CREEPY_EYES[5].maxsanity = .4 Link to comment https://forums.kleientertainment.com/forums/topic/36626-tuninglua-creepy-eyes/#findComment-484656 Share on other sites More sharing options...
Silentdarkness1 Posted May 20, 2014 Author Share Posted May 20, 2014 Nevermind, doing what @squeek said seems to have fixed that. All good now. Link to comment https://forums.kleientertainment.com/forums/topic/36626-tuninglua-creepy-eyes/#findComment-484705 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now