Too much text in quotation marks

Hey all,

I’m getting the error that I have too much text between quotation marks, when describing a room. I’m using the description of the first time the room is visited to set the scene and start the story, hence why it includes a lot of content. The error seems to suggest that the allowed amount of text is very high, and that’s it’s more likely an issue with the code rather than wordcount - however whatever I try I can’t seem to fix it. Can anyone give me a hand?

[code]“IndependentProject” by Tom Maxwell

Part - Introduction

The The Clearing is a room. "[if The The Clearing has not been visited]Ah, the smell of fresh air. It’s something you’ve missed in your later years - since you went freelance you can’t seem to get out of the house; it’s either sitting in front of the computer or looking after the kids. For once, you’ve managed to worm your way out of a Sunday babysitting to explore the great outdoors – this is what you dreamt of before moving out to Canada. The time is 10:17AM, so you’ve got a good few hours of peace ahead of you. Above you is a pastel blue sky, unblemished by clouds and complimented by an early morning sun. There is a slight mist in the air; not thick enough to impede sight but enough to dampen the senses. You set off up to toe-path toward the forest and walk with a spring in your step.

Time passes.

Checking your watch the time is now 11:15AM. You are now deep within the forest, and decide to stop for a snack. You slide off your backpack and set it down next to a rock, which makes a fairly comfy seat. In your bag you have a multitude of items to keep your calorie count and blood sugar up throughout the day, however a cereal bar is the first thing to catch your eye. Before taking a moment to enjoy your snack, you double check your equipment. Compass - check. Lighter - check. Mobile phone - check. .44 Magnum - Check. Pocketknife - check. You strap the compass to your belt and place all of the items back into your bag (apart from your lighter, which you prefer to have in your coat) and open the cereal bar. Chewing away, you notice how still the forest feels; there is a certain tranquillity here that doesn’t exist anywhere else. Holes in the canopy above you create golden spears of light that are visible to the naked eye; beams of warmth that fleck the forest floor as if splashed with a brilliant paint.

You pause for a moment, taking in the natural beauty around you. A feeling of serenity sweeps over you as you close your eyes and take a deep breath. You are truly at peace.

There is a rustling sound.

Opening your eyes no wider than a squint, you take a look around. It must have just been the wind, or a bird.

More rustling.

Now alert, you realise that the noise is being made by something larger than you originally thought. There is a slow padding behind you, and turning your head a large, four-legged shape comes into view.

Two large, brown eyes meet yours - looking back at you is a Grizzly Bear.

All the reading and research you have previously done couldn’t have prepared you for this moment. The creature is huge; a hulk of nature with claws the size of pitchforks and a jaw that could take off one of your arms in one quick snap. By sight alone you’d estimate the bear to weigh in at around 400KG - a brown behemoth that calls the vast forest its home. If you move, it might charge. If you don’t move, it might charge. You remember the guide you read stating to make yourself as big and as loud as possible when encountering a grizzly; you’re not even sure you could stand without your legs giving way underneath you.

The gun. Use the gun.

Glancing away for a second, you see your bag only a few feet away from you. It’s within arms reach. Turning your head back around, the bear is still fixated on you. Without breaking eye contact, you slowly reach out a hand and move the bag onto your lap. With a calm and quiet efficiency, you open it’s straps and rummage around, eventually retrieving your firearm. You take it and begin to…

The strap. The strap on the gun’s holster is stuck. You can’t unclip it, something has become stuck. You tug at it, but it won’t budge. In your panic, your bag falls to the floor - almost all of it’s contents fall on the ground. The bear tilts it’s head, watching with interest. It takes a few steps forward, inspecting the items that are now littered on the forest floor. It approaches, now almost within touching distance, and begins to nustle a sandwich with it’s muzzle.

You wake suddenly, as if startled by something. You hear a faint scurrying behind you, and as you spin your head around you see the plant-life twitch as if recently disturbed. The forest around you is thick; so dense the light barely travels through it. The sun beams down onto you, and by its position in the sky you guess it’s around midday. As you stand up you notice cuts on your hands that you hadn’t had earlier in the day – some of them still bleeding. You look at your watch but it’s been smashed in the fall; the screen remains barely in one piece and wires splay from where a button on the side used to be.[otherwise]The clearing is warm and tranquil.[end if]"[/code]

I don’t think it’s a coding error. Rather, it’s a lot of text. I resolved a similar issue by doing this (converted to something similar to what you’re doing):

[code]The The Clearing is a room. “[if The The Clearing has not been visited][clearing-desc-1][clearing-desc-2][otherwise]The clearing is warm and tranquil.[end if]”

To say clearing-desc-1:
say "Blah blah blah first part of clearing description. "

To say clearing-desc-2:
say “Blah blah blah second part of clearing description.”[/code]

You can test the if-statement by entering “look”. You’ll probably need to split it up into even more sections, so just add clearing-desc-3, clearing-desc-4, et al., as necessary.

The better way to show text at the beginning of the story is a “When Play Begins” rule.

When play begins:
    say "Ah, the smell of fresh air. It’s something you’ve missed in your later years...";
    say "All the reading and research you have previously done couldn't have prepared you for this moment...";
    say "You wake suddenly, as if startled by something..."

The Clearing is a room. "It is warm and tranquil."

This is cleaner and lets you break your text into multiple pieces. It also means you don’t have the room header “The Clearing” appearing above your intro text (since the player doesn’t move to the starting room until after the When Play Begins rules are run).

Thanks very much, I think I’ll go with Draconis’ fix. You are incredibly helpful, I may owe you a University module!

You can also seperate the whole text into smaller portio s and then call those up at beginning of play or when unvisited or whatever. I did this with my intro text.

the intro has some text called intro statement one. Intro statement one is "some text" The intro has some text called intro statement two Intro statement two is "some text"

When you want the statents to print run you can say

if room is unvisited: Say "[intro statement one][intro statement two]

This may need some tweaking as I am on my mobile trying to write this from memory. If you need help I can post what I actually have when I get home.

Draconis’ solution is the most efficient. If you want to be all florid about it, I suppose you could do it with tables:

[spoiler][code]Table of Introduction
text
“Ah, the smell of fresh air. It’s something you’ve missed in your later years - since you went freelance you can’t seem to get out of the house; it’s either sitting in front of the computer or looking after the kids. For once, you’ve managed to worm your way out of a Sunday babysitting to explore the great outdoors – this is what you dreamt of before moving out to Canada. The time is 10:17AM, so you’ve got a good few hours of peace ahead of you. Above you is a pastel blue sky, unblemished by clouds and complimented by an early morning sun. There is a slight mist in the air; not thick enough to impede sight but enough to dampen the senses. You set off up to toe-path toward the forest and walk with a spring in your step.”
“Time passes.”
"Checking your watch the time is now 11:15AM. You are now deep within the forest, and decide to stop for a snack. You slide off your backpack and set it down next to a rock, which makes a fairly comfy seat. In your bag you have a multitude of items to keep your calorie count and blood sugar up throughout the day, however a cereal bar is the first thing to catch your eye. Before taking a moment to enjoy your snack, you double check your equipment. Compass - check. Lighter - check. Mobile phone - check. .44 Magnum - Check. Pocketknife - check. You strap the compass to your belt and place all of the items back into your bag (apart from your lighter, which you prefer to have in your coat) and open the cereal bar. Chewing away, you notice how still the forest feels; there is a certain tranquillity here that doesn’t exist anywhere else. Holes in the canopy above you create golden spears of light that are visible to the naked eye; beams of warmth that fleck the forest floor as if splashed with a brilliant paint. "
“You pause for a moment, taking in the natural beauty around you. A feeling of serenity sweeps over you as you close your eyes and take a deep breath. You are truly at peace.”
“There is a rustling sound.”
“Opening your eyes no wider than a squint, you take a look around. It must have just been the wind, or a bird.”
“More rustling.”
“Now alert, you realise that the noise is being made by something larger than you originally thought. There is a slow padding behind you, and turning your head a large, four-legged shape comes into view.”
“Two large, brown eyes meet yours - looking back at you is a Grizzly Bear.”
“All the reading and research you have previously done couldn’t have prepared you for this moment. The creature is huge; a hulk of nature with claws the size of pitchforks and a jaw that could take off one of your arms in one quick snap. By sight alone you’d estimate the bear to weigh in at around 400KG - a brown behemoth that calls the vast forest its home. If you move, it might charge. If you don’t move, it might charge. You remember the guide you read stating to make yourself as big and as loud as possible when encountering a grizzly; you’re not even sure you could stand without your legs giving way underneath you.”
“The gun. Use the gun.”
“Glancing away for a second, you see your bag only a few feet away from you. It’s within arms reach. Turning your head back around, the bear is still fixated on you. Without breaking eye contact, you slowly reach out a hand and move the bag onto your lap. With a calm and quiet efficiency, you open it’s straps and rummage around, eventually retrieving your firearm. You take it and begin to…”
“The strap. The strap on the gun’s holster is stuck. You can’t unclip it, something has become stuck. You tug at it, but it won’t budge. In your panic, your bag falls to the floor - almost all of it’s contents fall on the ground. The bear tilts it’s head, watching with interest. It takes a few steps forward, inspecting the items that are now littered on the forest floor. It approaches, now almost within touching distance, and begins to nustle a sandwich with it’s muzzle.”

When play begins:
repeat through the Table of Introduction:
say the text entry;
say paragraph break.

Clearing is a room. “[if unvisited]You wake suddenly, as if startled by something. You hear a faint scurrying behind you, and as you spin your head around you see the plant-life twitch as if recently disturbed. The forest around you is thick; so dense the light barely travels through it. The sun beams down onto you, and by its position in the sky you guess it’s around midday. As you stand up you notice cuts on your hands that you hadn’t had earlier in the day – some of them still bleeding. You look at your watch but it’s been smashed in the fall; the screen remains barely in one piece and wires splay from where a button on the side used to be[otherwise]The clearing is warm and tranquil[end if].”[/code][/spoiler]

You dont need to use a table. My method does the same thing that Dracs does without having to write seperate say lines. I will post my version tonight so you can see how I did it. Its actually quite simple and self contained.

While I’m willing to be persuaded, I’m not sure I get your point; if you’re using the method you describe in your first post, it’s clearly a lot more boilerplate than either Draconis’s or my own implementation. It’s less a matter of “needing” to use tables or objects, and more about which is the most convenient and/or efficient solution (and the I7 implementation of tables is reportedly both fast and space-efficient).

Edit: Not that I want to come across as categorical or snobbish about it, of course. Some of it is purely aesthetic preference; I quite like the simplicity offered by table syntax.

There are probably myriad ways to accomplish this task. Quite honestly the most efficient way in my opinion is to list them directly but then again that is my personal preference. This is how I do my intro text.

[code]The intro statement is a thing. The intro statement has some text called intro-1. The intro statement has some text
called intro-2. The intro statement has some text called intro-3. The intro statement has some text called intro-4.

After printing the banner text:
say “[intro-1 of the intro statement][intro-2 of the intro statement][intro-3 of the intro statement][intro-4 of the intro statement]”.

intro-1 of the intro statement is “A bunch of text.[paragraph break]”

intro-2 of the intro statement is “A bunch of text.[paragraph break]”

intro-3 of the intro statement is “A bunch of text.[paragraph break]”

intro-4 of the intro statement is “A bunch of text.[paragraph break]Press Any Key To Continue[paragraph break]”[/code]

If you wish to put this into a n [if] statement such as [if the room is unvisited] you would simply make that a condition to print the statements.

Yeah, intro texts don’t really strain the capabilities of Inform 7. Even under frugal conditions (a C-64 z-machine terp, say) the difference is likely to remain negligible, unless we’re talking huge text masses.