HomeSpawnPlus

HomeSpawnPlus

342k Downloads

Error when using commands that cost money

D3v3l0per opened this issue · 7 comments

commented

Hello,

thanks for fixing the issue #42! :)
Unfortunately, using the /homeinvite command that costs money is causing an error.
If I set the price to zero, the command works again.

Here's the error: http://pastebin.com/ghV6Ty3x.
Also, here's my economy.yml: http://pastebin.com/TP9YqtWF
I'm using HSP Build #618.

Thanks in advance!

commented

Have you customized any HSP messages? HSP is returning this error when trying to print the COST_CHARGED message, which by default in English is "%price% charged for use of the %command% command." If you've customized it, you may have introduced a typo in the variables which could possibly cause this error.

I'm more suspicious that one of the substitition variables isn't getting filled in properly, so if you haven't customized any messages, then we can try customizing this one. Instructions here

Try customizing it without any subtitution, like:

COST_CHARGED=Your account was charged.

I suspect this will make the error go away. Then try introducing one variable at a time:

COST_CHARGED=Your account was charged for %command%.
COST_CHARGED=Your account was charged %price%.

Report back which one is broken (if at all) and that will help me narrow down the problem.

commented

Were you able to try the suggestion customized messages? I'm interested in which one was causing it to break. Also information about your environment would help me reproduce it: Server version, what economy plugin and version, using vault, anything else you can think of that would help.

commented

I'm not sure. There are a few locales that have special characters directly in them, I don't know how the translators put them there. Give the code or the direct characters a try and let me know what you find out.

commented

Hello,

thanks for your help. I'll try it out this evening and inform you here.
What do I have to do if I want to use the letters ö, ä, ü in translations? Is it necessary to use codes such as "\u00FC", and so on?

Regards

commented

"%price%" seems to be causing the error.
I removed it in the translation and everything worked well. For now, I'll probably just have to use "50$" instead of "%price%".
By the way, the code "\u00FC" for letter "ü" worked.

commented

What economy plugin are you using and do you know if it is supported by Vault? This sounds like Vault is returning null when formatting the price, which is likely an integration issue between Vault and your economy plugin.

I have a check in there that should prevent this from happening regardless, but obviously it's still happening. Knowing what economy plugin you're using would help since I could then try to reproduce the error and add some debug statements to figure out what is going on.

commented

Hey,

sorry for answering so late, but I haven't taken a look for new answers since February...
We're using Essentials 1.8 (by the Spigot team) for economy.
You can download it here:
https://hub.spigotmc.org/jenkins/job/Spigot-Essentials/

Thanks in advance!