New guy can't code

Hi there!

I’m using the documentation and Jim Aikin’s Handbook but I have some problems with the following two things:

PROBLEM ONE

[code]Understand “kiss [someone]” as kissing.
Understand “kiss [something]” as kissing.
Instead of kissing something which is not a person:
say “[The noun] do[if the noun is not plural-named]es[end if]n’t look very sanitary.”

Understand “lick [someone]” as licking.
Understand “lick [something]” as licking.
Instead of licking something which is not a person:
say “[The noun] do[if the noun is not plural-named]es[end if]n’t look very sanitary.”[/code]

The kiss thing works, the lick thing doesn’t.

For puzzle reasons I require “kiss” and “lick” to be separate functions.

PROBLEM TWO

[code]A thing has some text called the reading-material. The reading-material of a thing is usually “”.

The warrant is on the bed. The description is “Arrest warrant for [bold type]Vres Ruuga[roman type], by Judge Sahraan.” Understand “arrest” and “warrant” as the warrant.
The reading-material of the warrant is “[fixed letter spacing]This is a test.[variable letter spacing]”
Understand the command “read” as something new.
Reading is an action applying to one thing and requiring light. Understand “read [something]” as reading.

Check reading:
if the reading-material of the noun is “”:
say "Nothing is printed on [the noun].” instead.

Carry out reading:
say “[reading-material of the noun].”[/code]

I want to be able to read a warrant and have it all in fixed letter spacing, like it was printed off one of those telegraph fax printy thingies on a long strand of paper.
But when I try this, it won’t take it because there’s a . missing behind the reading-material. if i put a . there, it goes “this is a test..” and that’s not what I’m looking for.

I tried cheating it with

The reading-material of the warrant is "[fixed letter spacing]This is a test."; say variable letter spacing; say paragraph break.
but that doesn’t help, either. :frowning:

Can anyone help me?
Even if it’s just either that gets solved. ^^ I’ll be happy.

Not tested, I’m on the phone…

Problem 1:

It sounds like you need to define licking:

licking is an action applying to one thing.

Do this before the “understand licking” line.

Problem 2:

I’m not sure I understand your second problem. You have a period in the reading-material: “[fixed letter spacing]This is a test.[variable letter spacing]” and then you have a second period in

say "[reading-material of the noun]."

So when that prints, one period comes from the reading-material and one from the say phrase. So just remove the period from within the say phrase.

Hope that helps!

Oh, and in general it’s better to make two forum posts if you have two problem, and try to use sensible topics.

[code]A thing has some text called the reading-material. The reading-material of a thing is usually “”.

The reading-material of the warrant is "[fixed letter spacing]This is a test.[variable letter spacing]"

Understand the command “read” as something new.
Reading is an action applying to one thing and requiring light. Understand “read [something]” as reading.

[/code]

I havn’t tested any of this but at first glance it looks like you are missing the period that should come after the “[fixed letter spacing]This is a test.[variable letter spacing]”{period here}
{Understand} starts a new piece of code so without this period it is running together.

that leads to double periods. :frowning:

like this..

Put the period outside the quotation marks. :wink:

But then the font won’t match up! :c

Portions of the Handbook are seriously out of date – and they’re randomly distributed. I started revising it this winter, but the state of the 3rd-party extensions was such a mess that I bailed out.

I usually refrain from kvetching about this, but since you’re actively using the Handbook, perhaps I should explain.

[rant]A very convenient extension that I had recommended in the Handbook (Consolidated Multiple Actions by John Clemens) is no longer compatible, there’s no replacement, and no one came forward with a suggestion for how to fix it. To my way of thinking, this is a basic defect in Inform 7 itself. Inform 7 relies on 3rd-party extensions for many types of desirable functionality, and Graham intended from the very beginning that it do so – but backward compatibility was not built into the design of the system, nor was a coordinated procedure employed that would allow the system maintenance crew to update existing extensions.

I would contrast this with my experience with Csound. A couple of days ago, someone on the Csound email list alerted the community to a problem. Within 24 hours, one of the chief system maintainers had uploaded a fix. Those who can compile Csound from source can access the fix now, and it will be in the next official release, which I’m sure will occur within a month or so.

Like I7, Csound is free software, and those who maintain it are not paid for their work. And like I7, Csound has a facility for users to create their own 3rd-party widgets and upload them to a website. Unlike I7, Csound is designed and maintained in such a way as to provide backward compatibiilty for old code. I’m not a software engineer, but I’m pretty sure this could have been done with I7.[/rant]

should… Should i -not- use the handbook then?

Because I read that post a few times and maybe i’m just tired after a long day of tinkering but i didn’t … I …

I don’t understand.

It is entirely possible I’m just dumb. I have an IQ that the testers claimed is 163 and it’s never been any help to me so … yeah. Probably just dumb.

It’s about the thing on page 267 , the jewel box thing.
And it doesn’t work anymore? And it can’t be fixed, and they can’t use the old file because I7 is rebuilt from the ground up and thus not standard backwards compatible.

which is an example of the book being out of date (it’s 4.5 years old, i figured that could be the case)

I mean, it says so right on the cover:
11124058_767143240050426_1054147489_n.jpg

Still has some very useful stuff in there, and I assume most of it (maybe not the more advanced tricks) is still good?

Large swaths of the Handbook should still be valid … it just can’t be relied on, that’s all. The “Dangerous Jewel Box” example doesn’t work because it uses a procedural rule, and those are no longer supported.

I’m sure there are ways to fix this particular problem, but to be honest, I don’t do stuff with I7 anymore. It just doesn’t interest me. If there were a practical way to rewrite the Handbook, I would do so in order to support the community of authors who are using I7. But this would require, I’m sure, hours of volunteer work on the part of someone else – someone who knows a lot more about the innards of the language and library than I do. If anyone wants to volunteer for the project, do let me know.

As a side note, the error message produced by the I7 compiler when it encounters a procedural rule does not explain that this type of rule is no longer supported. What’s worse, the Search field for the Documentation does not find any entry for “procedural rule,” much less direct you to an explanation of how to replace a procedural rule.

Not only is the software not backward-compatible, both the compiler and the documentation deliberately obfuscate this fact.

So you wouldn’t be opposed to, say, a community-based volunteer rewriting of the handbook?

I’m unable to partake in that project, but I’m curious about it. Your handbook has long been an invaluable guide, it keeps popping up. Would you be ok with putting up a “call to volunteers” and make the original text available for editing?

I could help.
understand “using the new manual to make an IF to see if it’s good enough to teach a numbnuts as myself to get inform7 to work” as helping. (ayyyyyyy inform7 joke)

In this particular case (the dangerous jewel box) the problem isn’t hard to fix. Procedural rules can usually be replaced with “…does nothing” or “…substitutes for…” declarations in the new versions. I separated the condition here to make it more readable.

To decide whether acting dangerously:
    if the jewel box is not dangerous, no;
    if taking gems, yes;
    if removing gems from the jewel box, yes;
    no.

The announce items from multiple object lists rule does nothing when acting dangerously.

i think we’re getting derailed.

Probably.

Regarding the punctuation problem, what do you mean about “the font won’t match up”? If it’s outside the quote marks it’s just for Inform, it won’t be shown to the player.

Testing has proved this to be a lie. /maury

where the bold stuff is fixed letter spacing font and the non-bold period at the end is the regular variable letter spacing font.

The original text is available for download on the same page as the PDF: http://www.musicwords.net/if/i7hb.htm. You’ll need OpenOffice or something that can open an OpenOffice document, but that’s trivial.

The Creative Commons License at the end of the Handbook is explicit: You have the right to freely make adaptations.

On the whole, I feel an organized update (with me as the coordinator) would probably be better than having five people rush off in five different directions with it. But you’re free to do what you like.

I have done some additional work on it already. I’ve revised more than 100 pages.

Then the situation isn’t as bleak as you painted it. :slight_smile: Glad to hear it.

… that’d be something nice. a revised handbook brought up to date for numbnutses like me. :slight_smile:

It’s because you have the period—inside the quotes—in two different places. They both print. Move them both outside the quotation marks and they’ll disappear.

Assuming you’re commenting on my message, perhaps I should clarify that the version of the Handbook available for download is still the 2009 version. The updated chapters have not been uploaded.

I could be talked into finishing the new version – but some authoritative technical assistance would be needed. A way to replicate the behavior of that vanished extension is not likely to be the only technical issue that would need to be addressed. Posting questions to the forum is hit-or-miss. I feel disinclined to go on with the project given the very real probability that some future question would likewise prove unanswerable, or at any rate not answered.