Right, you are getting a null result from text2path(). Make sure that the path that text2path() is trying to create is valid.

I understand that you are expressing persistence semi-seriously, but trying a thousand different things is never going to help. When you run into issues with code, you need to try targeted surgery. Just trying random things isn't going to help you because debugging isn't about guessing randomly. It's about using logic to deduce and correct the problem as well as build a better understanding of why the errors occurred in the first place.
Posting update because I've noticed a lot of forums never have all the solutions!

No need to defend myself. I do understand the scalpel versus hammer logic.

After many confusing hours of testing code and being uncertain which part was wrong (underscore, list names, variable names, etc.) I realized the first / in text2path was missing.

                var/charactertype = text2path("/mob/player/character/[charactergenders[charactergender]]/[charactertones[charactertone]]")


Resolved code above. Thanks again for all your help Ter! I am sure I will be back soon with another problem soon enough...
I noticed your errors weren't spitting out line numbers. You can get the specific line number where a runtime error occurs by compiling in DEBUG mode. Code executes a little slower, but it will give you file/line numbers for where runtimes happen and more in depth call stack information.

Klogaum was actually trying to articulate something useful to you with his boat metaphor the other day.

do.Thing()
do.SomethingElse()
herp = derp
derp = herpyderp


Since the interpreter runs through your code line by line, you can put little debugging messages into the code to figure out where something has gone awry:

do.Thing()
world.log << "reached 1"
do.SomethingElse()
world.log << "reached 2"
herp = derp
world.log << "reached 3"
derp = herpyderp
world.log << "reached 4"


That way, you can count up which lines the code managed to reach, and potentially figure out where in your code an issue is happening or a value has spit out an unexpected value.

When you are exploring a problem, this is an extremely useful method of debugging, because it helps you target your thinking about a problem.
Page: 1 2

Login to reply.