maartenl / Land-of-Karchan

Where one can change into a hero with a single swipe of his sword.
http://www.karchan.org
GNU General Public License v3.0
7 stars 3 forks source link

**MAJOR: Adding Attributes Not Working In Game #213

Closed wastedshame closed 1 year ago

wastedshame commented 1 year ago

We've been using the commands 'xattribute' and 'xremattribute' to add and remove attributes.

The first one does not work, and it is set up to set any attribute we want by typing dub name (attribute), ex: dub Victoria deputy. The command 'undub name (attribute)' still works, as I tested it on my wife's character, and it is not that much different. Ex: undub Almahvius canijoin.

I tested a popular command meant to add a specific attribute as well, and it appears that the attribute did not work for this either.

This is a major bug for us.

I should note that the attributes can be added through the admin pages, but that isn't enough.

If you require any further testing, please let me know.

maartenl commented 1 year ago

What error message do you get? (error messages can also be viewed in karchanadmin app, Systemlog.)

wastedshame commented 1 year ago

Screenshot_20221207-082755 Screenshot_20221207-082805 Screenshot_20221207-082816

wastedshame commented 1 year ago

I should add that in game, there is no error message. It just doesn't add the attribute and the command entered to add it doesn't get removed from the submit bar.

maartenl commented 1 year ago

The method signature is: public void setAttribute(String name, String value)

The value should be a string. Try "true" instead of true.

I'm very sorry for all this, but the upgrade from Java 11 to Java 17, causes the Javascript engine Nashorn we use to be removed. I've replaced it with the one from GraalVM, but it is more strict in how it handles calls between JavaScript (no typing) to Java (static typing).

Expect more problems.

But leave this one open -> we should have proper error messages to the user, so there's something wrong there.

wastedshame commented 1 year ago

This was resolved and never closed, so doing that now.