ninja0fd00m Posted February 22, 2015 Share Posted February 22, 2015 As my title states, I have two different issues, and as I am rather new to modding (as of yesterday) I'm having trouble finding an error.On line 33 of that incredibly helpful template, the game gives me an error if I try to launch it. The code is such : STRINGS.CHARACTER_TITLES.brother-chaplain maximus = "Speaker of the word of the Emperor" I'd be extremely grateful if someone was to tell me what I'm doing wrong.Also, I'd like to give him a perk that makes nearby allies regenerate sanity. Kinda like the opposite of the sanity drain aura.(for any Warhammer 40k Fans out there, yes, This is a space marine chaplain. A friend and I are also making a Tau Fire caste warrior, and plan on making a representative of each major race from the Wh40K Universe) Again thanks to anyone who took the time to look at this and help me out! Link to comment https://forums.kleientertainment.com/forums/topic/51317-help-request-an-error-and-an-aura/ Share on other sites More sharing options...
Jjmarco Posted February 22, 2015 Share Posted February 22, 2015 (edited) @ninja0fd00m, Variable names can't have spaces or dashes. Either you remove them, or, if you absolutely want to use that format, put it between brackets and quotation marks: STRINGS.CHARACTER_TITLES["brother-chaplain maximus"]. As for the sanity aura, you have to add the sanityaura component to your character, in master_postinit:inst:AddComponent("sanityaura")Then, use the aurafn function to give off sanity regen to nearby players if they are allies:inst.components.sanityaura.aurafn = function(inst, observer) if [test if the observer is an ally] then return TUNING.SANITYAURA_SMALL -- small sanity regen else return 0 endendI don't know what's your condition for a player to be an ally, though.Unless you mean to every player around, in which case, just use inst.components.sanityaura.aura = TUNING.SANITYAURA_SMALL. Edited February 22, 2015 by Jjmarco Link to comment https://forums.kleientertainment.com/forums/topic/51317-help-request-an-error-and-an-aura/#findComment-615586 Share on other sites More sharing options...
ninja0fd00m Posted February 23, 2015 Author Share Posted February 23, 2015 So, that worked, thanks for the help, but now I get this error screenshotted below.I even went back reinserted the template version with the new character name, it gave me that error.I don't quite understand what my problem is. So, that worked, thanks for the help, but now I get this error screenshotted below.I even went back reinserted the template version with the new character name, it gave me that error.I don't quite understand what my problem is. Link to comment https://forums.kleientertainment.com/forums/topic/51317-help-request-an-error-and-an-aura/#findComment-615696 Share on other sites More sharing options...
ninja0fd00m Posted February 23, 2015 Author Share Posted February 23, 2015 So, that worked, thanks for the help, but now I get this error screenshotted below.I even went back reinserted the template version with the new character name, it gave me that error.I don't quite understand what my problem is. Link to comment https://forums.kleientertainment.com/forums/topic/51317-help-request-an-error-and-an-aura/#findComment-615697 Share on other sites More sharing options...
SenL Posted February 23, 2015 Share Posted February 23, 2015 Then, what is line 35 of your modmain.lua? Link to comment https://forums.kleientertainment.com/forums/topic/51317-help-request-an-error-and-an-aura/#findComment-615712 Share on other sites More sharing options...
ninja0fd00m Posted February 23, 2015 Author Share Posted February 23, 2015 Oops, sort of forgot to include that...STRINGS.CHARACTERS_DESCRIPTIONS.maximus = "*Perk 1\n*Perk 2\n*Perk 3" Link to comment https://forums.kleientertainment.com/forums/topic/51317-help-request-an-error-and-an-aura/#findComment-615806 Share on other sites More sharing options...
rezecib Posted February 23, 2015 Share Posted February 23, 2015 (edited) @ninja0fd00m, I think the error is actually a syntax error on line 34 (it just doesn't realize the syntax is wrong until it gets to line 35). Just show us that general section. Edited February 23, 2015 by rezecib Link to comment https://forums.kleientertainment.com/forums/topic/51317-help-request-an-error-and-an-aura/#findComment-615829 Share on other sites More sharing options...
ninja0fd00m Posted February 23, 2015 Author Share Posted February 23, 2015 Here's the whole segment of code.Thanks for taking a look at it for me ! Link to comment https://forums.kleientertainment.com/forums/topic/51317-help-request-an-error-and-an-aura/#findComment-615838 Share on other sites More sharing options...
Jjmarco Posted February 23, 2015 Share Posted February 23, 2015 (edited) @ninja0fd00m, That's because you put STRINGS.CHARACTER_TITLES["Chaplain Maximus"] without anything else.The Lua interpreter expected an "=" because it thought you were trying to assign line 35 to line 34. But you can just remove that line, as you've already defined your character's title on line 33. Edited February 23, 2015 by Jjmarco Link to comment https://forums.kleientertainment.com/forums/topic/51317-help-request-an-error-and-an-aura/#findComment-615855 Share on other sites More sharing options...
ninja0fd00m Posted February 24, 2015 Author Share Posted February 24, 2015 It's working now, thanks for the help ! Link to comment https://forums.kleientertainment.com/forums/topic/51317-help-request-an-error-and-an-aura/#findComment-616179 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