MobHunting

MobHunting

114k Downloads

Bug with the placeholder {prize}. :D

TheIntelloBox opened this issue · 41 comments

commented

Hey ! :D

When someone kills a mob, he earns money but the message is : "Player earns {prize}€". :D
So the placeholder is not working. :D

Could you tell me how to fix it ? :D

Thanks ! :D
TheIntelloBox. :D

commented

Hi ! :D No problem ! :D Thanks. :D

commented

It looks fine to me, I cant see whats wrong. I cant test this the next days because im off on a mini vacation

commented

So be patient :-)

commented

Hey ! :D

Could you tell me how to solve the problem ? :D

Thanks ! :D

commented

Which mob are you testing on?

commented

I have actually been looking at this, but I didt find the bug. It should work. I will have to do some live testing again.

Could you please show me the full section the the mob you is testing on?

commented

Here is my config.yml: https://hastebin.com/ewipoyadoq.php ! :D
And my en_US.lang: https://hastebin.com/kagiruluvi.sql ! :D

Thanks. :D

commented

Please mention which bug I should test on? Have you tried on the Spider?

commented

I cant find the text you mention in the spider settings???

# ### Spider settings ###
spider:
  enabled: true
  message: Tu as tué un §1{killed}
  money:
    amount: 5.5:10.5
    chance: 1.0
  commands:
  - chance: '0.05'
    cmd: give {player} iron_ingot 1
  head:
    drophead: true
    value: '0'
    chance: 0.05
    message: §aThe §1{killed} §aa jeté une tête par terre
commented

If I kill any mob, there is the bug.

commented

I'm back. :D (France are in finals of the Fifa World Cup 2018 in Russia ! :D)

https://cdn.discordapp.com/attachments/460816046501265417/466348142099562507/unknown.png

commented

This text is in the en_US.lang.

commented

Ahhhh I was focusing on config.yml

I will need the key name to make sure it works. The placeholders will not work in every text string

My guess is you are talking about these one

mobhunting.moneydrop=Tu as droppé ${money}
mobhunting.moneygain=Tu as gagné ${prize}!

I see that I have made a mix of "prize" and "money" but in next release both will work. This should fix your problem.

Please test this snapshot: https://fractal.lindegaard.one:8181/job/MobHunting/658/

commented

Should I delete the en_US.lang or the config.yml ? :D

commented

No, you should not need to do so

commented

It should work now out of the box, if you use lastest snapshot

commented

I guess you are french :-) Congratulations!

I see I will have to test this again :-( (When I am back from work)

commented

Thanks. :D

commented

Is the bug fixed ? :D

commented

I cant still replicate the problem. Please enable debug /mh debug
and kill a mob and let me see the out in the console

commented

No I was not able to replicate the problem and I was busy fixing a serious problem. V1.1.4

commented

I tested but i think it worked but i had no time to dive in and find the problem

commented

Please confirm this is the lines we are talking about

mobhunting.moneydrop=Tu as droppé ${money}
mobhunting.moneygain=Tu as gagné ${prize}!

commented

mobhunting.moneygain=Tu as gagné ${prize}!

commented

?

commented

I'm busy with the MC1.13 update, sorry.

Also I was not able to replicate the problem. So its not that easy to fix. Your configuration must be diffrent from mine.

commented

Maybe I should take a look at this again :-)

commented

What should I delete in the config or in the lang.yml ?

commented

please let me see your lang.yml to check if you need to delete lines. Use pastebin

commented

maybe you are missing a $ infront of {prize} somewhere ?

commented

You have written the placeholder with a wrong format
this line is
mobhunting.achievement.awarded.prize=Tu as été récompensé de {prize}€ !

should be
mobhunting.achievement.awarded.prize=Tu as été récompensé de ${prize}€ !

commented

You must always use it like "${somename}"

commented

Could you add the possibility to change that ?

commented

???? No, why should I do this???? You dont see the placeholder. You dont see the $

Check all the other placeholders...

commented

It makes no sense. In real life, you don't earn €1 but 1€

commented

You have misunderstood how the placeholders work try

You have written the placeholder with a wrong format
this line is
mobhunting.achievement.awarded.prize=Tu as été récompensé de {prize}€ !

should be
mobhunting.achievement.awarded.prize=Tu as été récompensé de ${prize}€ !

you dont see the $ its a port of the placeholder

commented

Oh yes, sorry, I understand now, I'll try and tell you if it works

commented

It does :-)