[Encore] Internal Server Error

Daniel Jung jung at uib.no
Thu Nov 26 04:35:00 MST 2009


paul wrote:
> #125:insert_line_breaks, line 11:Type mismatch
> ... called from #172:_html, line 10
> ... called from #32:get, line 55

#172:_html is, as Barbara said, probably defined on #3 ($room) and 
inherited. Line 10 will probably try to get the description (or 
something) of the room and insert line breaks - in the LIST of lines 
which #125 is expecting. I have the suspicion that your room has a 
pooched property, like a description which was turned into being not a 
list (or not a string). Maybe your room's description was being erased 
and type-cast to be an INT (integer), like 0.

You can change the data type of your room. But that would help only for 
your room. I think #125 is working by the "garbage in, garbage out" 
method; it should be changed THERE in order to circumvent error casting 
in any other pooched rooms. It WILL happen again.

A line like

    {text} = args;
    typeof(text) != LIST ? text = {text} | 0;

at the very beginning of the #125 verb would change every argument 
passed to this verb into being a list, for starters. If the verb needs 
strings (one or more) to work on, you should make sure that all elements 
in that list WILL be strings. E.g.,

    for line in (text)
       typeof(line) != STR ? line = tostr(line) | 0;
       ... (your code) ...
    endfor

HTH
- Daniel






More information about the Encore mailing list