(resolved) Issue with wallset identifiers

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

(resolved) Issue with wallset identifiers

Post by Gambit37 »

This works:

Code: Select all

dsb_alt_wallset(wallset.wallwriting_style1, lev, x, y, d)
but this doesn't:

Code: Select all

wallwriting_style = "wallwriting_style1"
dsb_alt_wallset(wallset[wallwriting_style], lev, x, y, d)
I'm not sure what I'm doing wrong in the second example?
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Issue with wallset identifiers

Post by Sophia »

I think you'll need to post more code. The result of what you posted should be identical so something else is going wrong.
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Issue with wallset identifiers

Post by Gambit37 »

Gah, sorry, silly mistake. The above code was simplified and not exactly what I had written in my function.

Turns out I'd defined a variable in an (if..then) as local, so it never got returned to the rest of the function... feel free to delete this thread!
Post Reply