Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

inform6 variables

26 views
Skip to first unread message

Rickard Hultgren

unread,
Mar 29, 2013, 12:36:03 PM3/29/13
to
Hi,

When I try to compile the code below I get a warning on "self.psa_variable = true ;". How should I change the value from false to true?

Thanks in advance for reply!

NPC one "one" one_room1
with psa_variable = true ;
before [;
PSA:
psa_variable false ;
"bla bla bla.^" ;
self.psa_variable = true ;

Andrew Plotkin

unread,
Mar 29, 2013, 2:04:54 PM3/29/13
to
What is the warning? If you want to ask about errors, you should
include the error message in your question.

In this case I bet it's "Statement cannot be reached." The
"bla bla bla.^" statement above is short for

print "bla bla bla.^"; newline; return true;

So the program will never reach the following line. Use

print "bla bla bla.^";

by itself if you want to keep executing in the same function.

Also, your object definition has the wrong punctuation. You want

NPC one "one" one_room1
with psa_variable true,
before [;
PSA:
print "bla bla bla.^";
self.psa_variable = true ;
];

--Z

--
"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the borogoves..."
*

Rickard Hultgren

unread,
Mar 29, 2013, 5:10:13 PM3/29/13
to
Thanks for the reply!

The warning message I get is:

Warning: This statement can never be reached
> self.psa_variable = true ;


David Griffith

unread,
Mar 30, 2013, 1:44:43 AM3/30/13
to
That's because in the previous line you have code like this:
"blah blah blah";
That's equivalent to:
print_ret "blah blah blah";

Use `print "blah blah blah";' instead.

--
David Griffith
davidmy...@acm.org <--- Put my last name where it belongs
0 new messages