FurryEskimo Posted September 2, 2020 Share Posted September 2, 2020 Here's what I know so far: https://www.lua.org/pil/3.4.html Thing is, it doesn't seem to work at all the way I'm using it. Is it even possible? local a = Testing STRINGS.CHARACTER_DESCRIPTIONS.furryeskimo = (a .. "Testing") --Expected outcome: "Testing Testing" Edit: Figured it out. Pretty basic actually, and I'm mostly leaving this here so others know. This game me a clue: local a = "Testing" --THIS needs to be in quotes, which seems obvious, but it can be easy to overlook.STRINGS.CHARACTER_DESCRIPTIONS.furryeskimo = a .. "Testing" --Expected outcome: "Testing Testing" >>>I'm using this to make a custom character description, changing based on the mod's configuration settings. Link to comment Share on other sites More sharing options...
penguin0616 Posted September 2, 2020 Share Posted September 2, 2020 (edited) @FurryEskimo It doesn't work because a isn't a string. It's nil. -- Bad -------------------------------------- local a = Testing -- Testing here is a nil variable. This will not work for concatenation. print(a .. "Testing") -- This will error because a is nil. -- Good ------------------------------------ local a = "Testing" -- This is a string, which is required for concatentation. print(a .. " Testing") -- This will print "Testing Testing" -- So your revised code is... local a = "Testing" STRINGS.CHARACTER_DESCRIPTIONS.furryeskimo = a .. " Testing" Edited September 2, 2020 by penguin0616 syntax highlighting problem? 1 Link to comment Share on other sites More sharing options...
FurryEskimo Posted September 2, 2020 Author Share Posted September 2, 2020 Mhm. Since my modded character has like, eight or so features that directly change their abilities, I figured the character select screen should tell you what their current abilities are. Link to comment 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