devilishMendicant Posted July 21, 2015 Share Posted July 21, 2015 Hello hello, I apologize for taking up your time, but I have never done anything of this sort before and I've run into a problem. When I try to run my character mod, the following error occurs: [string ".../mods/Sin-Genjitsu, the Shadow/modmain.lua"]:33: '=' expected near '-' And the whole thing crashes. My hypothesis is that there's a problem with the name having a dash in it. (e.g. STRINGS.CHARACTER_TITLES.sin-genjitsu) If there's more information that I need to provide or a specific place that's going wrong (besides line 33, does :33: refer to line 33?), I'd be happy to copy-paste anything relevant in order to get to a solution. Thank you again for your time and assistance. Link to comment https://forums.kleientertainment.com/forums/topic/56367-new-at-modding-and-coding-what-have-i-done-wrong/ Share on other sites More sharing options...
Developer ImDaMisterL Posted July 21, 2015 Developer Share Posted July 21, 2015 (edited) It's probably the "-" yes. The prefab for your character shouldn't have that symbol, only do that when naming the character itself.STRINGS.NAMES.singengitsu = "Sin-Gengitsu"Example, name your prefab "singengitsu" and in that line of code you'll name your character what you want it to be in-game, inside the quotations. Then you can procede to make your character's titleSTRINGS.CHARACTER_TITLES.singengitsu = "Blah blah blah."Or... do what @PeterA, told you to do, yeah, that sounds like a... a better idea. Edited July 21, 2015 by ImDaMisterL Link to comment https://forums.kleientertainment.com/forums/topic/56367-new-at-modding-and-coding-what-have-i-done-wrong/#findComment-656244 Share on other sites More sharing options...
Developer PeterA Posted July 21, 2015 Developer Share Posted July 21, 2015 Yup, the issue is most likely on line 33 or just above it. Post your modmain.lua file and we can help you out. Link to comment https://forums.kleientertainment.com/forums/topic/56367-new-at-modding-and-coding-what-have-i-done-wrong/#findComment-656245 Share on other sites More sharing options...
devilishMendicant Posted July 21, 2015 Author Share Posted July 21, 2015 Ah, thank you for the response! Here's my modmain.lua file. modmain.lua I'm going to go through and change the instances of sin-genjitsu to singenjitsu, as I was looking through other topics and noticed that the name of WX-78 was not hyphenated in the code either. Link to comment https://forums.kleientertainment.com/forums/topic/56367-new-at-modding-and-coding-what-have-i-done-wrong/#findComment-656251 Share on other sites More sharing options...
Developer bizziboi Posted July 21, 2015 Developer Share Posted July 21, 2015 It's indeed the dash in 'STRINGS.CHARACTER_TITLES.sin-genjitsu =' You can't have a dash in the variable name as Lua will think you're trying to subtract.Maybe use an underscore, or, if you really feel you *must* use a dash you could do: 'STRINGS.CHARACTER_TITLES["sin-genjitsu"] =' Link to comment https://forums.kleientertainment.com/forums/topic/56367-new-at-modding-and-coding-what-have-i-done-wrong/#findComment-656279 Share on other sites More sharing options...
Developer ImDaMisterL Posted July 21, 2015 Developer Share Posted July 21, 2015 ["sin-genjitsu"] Nice to know this! Thanks! Link to comment https://forums.kleientertainment.com/forums/topic/56367-new-at-modding-and-coding-what-have-i-done-wrong/#findComment-656285 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