Jump to content

Recommended Posts

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.
  • Developer

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 title

STRINGS.CHARACTER_TITLES.singengitsu = "Blah blah blah."

Or... do what @PeterA,  told you to do, yeah, that sounds like a... a better idea.

Edited by ImDaMisterL

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. 

  • Developer

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"] ='

 

 

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...