Missing something just don't know what

bombar

Member
When I use the command:

ashq print(have_effect($effect[Buy! Sell! Buy! Sell!]));

I see:
Changing "Buy! Sell! Buy! Sell!" to "Buy! Sell! Buy! Sell!" would get rid of this message ()

What am I doing wrong?

Code:
> ashq print(have_effect($effect[Buy! Sell! Buy! Sell!]));

Changing "Buy! Sell! Buy! Sell!" to "Buy! Sell! Buy! Sell!" would get rid of this message ()
90

Also tried with same result:
ashq print(have_effect($effect[Buy\! Sell\! Buy\! Sell\!]));

(Note: This is part of a much larger conditional, just breaking it out and adding print to help show issue)
 
Last edited:

lostcalpolydude

Developer
Staff member
There are two spaces after each ! in the effect name. I don't know what, if anything, can or should be done differently by mafia to clarify that.
 

bombar

Member
There are two spaces after each ! in the effect name. I don't know what, if anything, can or should be done differently by mafia to clarify that.

Okay thanks!

ashq print(have_effect($effect[Buy! Sell! Buy! Sell!]));
produces (for some reason when I hit enter it removes the extra spaces):
Code:
> ashq print(have_effect($effect[Buy! Sell! Buy! Sell!]));

Changing "Buy! Sell! Buy! Sell!" to "Buy! Sell! Buy! Sell!" would get rid of this message ()
0

I think one of the issues is that the string that says you should change to doesn't include the extra space, I usually copy and paste whatever is between the quotes into my script but in this case it still caused an issue.

But I did get it working if I do:
ashq print(have_effect($effect[Buy!\ \ Sell!\ \ Buy!\ \ Sell!]));

So thanks alot!
 

Veracity

Developer
Staff member
The string DOES include the extra space, but when it is displayed in the gCLI, since that is HTML, it collapses multiple spaces into a single space.

We could probably wrap each string in "pre" tags to preserve the spaces.
 

Veracity

Developer
Staff member
I had the same thought. Unfortunately, my experimentation with the ASH warning is coming up empty.

- wrapping individual parts of the line with "pre" tags displays with a line break before and after the fixed-width parts
- wrapping individual parts of the line with "code" tags seems to display the whole line in an unattractive font, but still only shows single spaces, even when two spaces are present in the string.

Perhaps I need to set the style in the buffer to specify monospaced font for the "code" tag - but I would have thought that was the default.

Regarding new item/etc. data, I am thinking that we might have a RequestLogger.printFormattedLine( String line ) which wraps the passed in line with pre tags before appending it to KoLConstants.commandBuffer.
 

xKiv

Active member
Perhaps I need to set the style in the buffer to specify monospaced font for the "code" tag - but I would have thought that was the default.

AFAIK, css has a property for that; name is "white-space", value "pre" (as in, style="white-space: pre;").
(but I have no idea what can be used in java's html renderer)
 
Top