Error? Child of Nothing? Help!!!

Hello, all! I’m new to the site. I’m making one beast of an IF game. In this game, you choose 1 out of 10 paths. Five different paths for a male character and five different paths for a female character. Right now, I have a lot of questions. I’m getting the hang of a good deal of it, but the problem is, I have a brain injury so some things that should make sense, doesn’t. I’ll definitely be asking for help again because I need help with escaping from battle, the money/buying… But for right now, I’m not worried about that.

I keep getting “Programming error: tried to find the “child” of nothing.” Before, in the previous version of Inform 7, this was never a problem. Now it seems to be. A code example is:

Understand the command “laugh” as something new. Understand “laugh at [someone]” and “laugh at [yourself]” as laughing at. Laughing at is an action applying to one visible thing. Understand “laugh” as laughing. Laughing is an action applying to nothing.

Check laughing:
say “You laugh out loud, despite your current situation.”

Check laughing at yourself:
say “Thinking of a funny joke, you enjoy yourself in laughter.”

Check laughing at Fate:
say “You laugh at Fate! As if SHE has any control over YOUR life! Well, at the moment, she kind of does…”

Understand “laugh with [someone]” as laughing with. Laughing with is an action applying to one thing.

I also get “You must supply a second noun” when I try to laugh at myself. And the “child” thing happens to all of my actions now. Can anybody help? This is driving me nuts. This is just one example of it going wrong.

I’m no expert, but I think that coding “laugh” and “laugh at” and “laugh with” as three different actions has caused I7 some confusion.

Try fixing up the “does the player mean” instead. Erase “laughing is an action applying to nothing.”

If the player types “laugh” and does not supply a noun, try laughing at nothing.

(note: above is not actual code, use at your own risk. This is paraphrasing.)

Maybe, but for some regular actions that only involve one understanding and description, that happens too. This just really confuses me. Also, I know that I haven’t finished the “laughing with” part yet. There’s nothing down there carrying it out.

Can you post a full example that shows this behavior? Make a new test project and see if it persists?

That’s weird. I put the code in a new test and the laughing thing works, so I assume all the others will work. But in my main game file, I still get the same message. The code is the same. So what in the world…

Hero’s Destiny
Although you have a body and some sense of self-awareness, you feel empty inside. You know that there’s something more, but you can’t wrap your mind around it. Looking around the strange and vibrant blue space you are floating in, you see a beautiful woman clad in a shimmering silver dress standing on a white pedestal. She beckons you to come to her. You flail your arms and legs about as you are still floating and make your way to her pedestal. Your legs are immediately suctioned to the hard surface. “Please speak with me, Hero,” she tells you.

You laugh out loud, despite your current situation.

[** Programming error: tried to find the “child” of nothing **]

laugh at fate
You laugh at Fate! As if SHE has any control over YOUR life! Well, at the moment, she kind of does…

That’s in the main game. But the test file works.

You’re sure you copied everything over to the new file?

I copied everything. And I just copied the entire game into the new file just to make sure. And I get the same error. But that code in the new file… It works. So what???

I don’t get the “second noun” trouble in the test file, either. But when I copy over the entire game to the test, everything goofs up. But if the code works in the test, does that mean I have to type everything over again? I have over 4,600 words and I haven’t even started the game…

No, it probably means that the problem is somewhere else in your game rather than just that snippet. Which unfortunately means we’ll need to see more code to help you.

Try copy-pasting it to the new file one section at a time, and see where it stops working. Then the last part you copied is probably the problem.

Ah, okay. Thank you.

There it is. It was the combat section. Either the entire thing, or part of it. I’ll mess around with that. Thank you! Now I just need to figure out how to escape from combat and how to get the money system working and buying stuff. But that’s another topic for another time. Thank you again! Problem is solved! :smiley:

If you have difficulty again, once you know the section, post that code specifically. It’ll help us find the problems.