Skript

Skript

743k Downloads

Skript Crashed while getting player's money

zopn333 opened this issue · 7 comments

commented

Skript/Server Version

Skript 2.9.0
Paper 1.21-81

Bug Description

It's in my guild system, I wrote a very simple script to make a function to get player's data and cauculate them. It works perfectly on my local test server, but today my player told me it
doesn't work. Here is error log and part of script:
error.log
function.txt

Expected Behavior

It will just get player's money and do other things, but the result is , lead to a broken return of function.

Steps to Reproduce

After players report to me, I reloaded skript and it's fine at begining, then they use the same command and it break down again. I've tested permission, player ID with underline or not, didn't find the cause.

Errors or Screenshots

The result should be like this:
397d6ca47cec4ffaa08d15d3cd0aa26
But player's resule is this:
4c597aebc4dd18d5832c6644d35ee10

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
commented

@UnderscoreTud I'd expect the money to be converted to a double, any ideas?

commented

@UnderscoreTud I'd expect the money to be converted to a double, any ideas?

I will take a look later

commented

@zopn333 can you send the full result of /sk info please?

commented

I'm struggling to replicate on 2.9.0
Can anyone else replicate it with the following?

command test:   
    trigger:
        #6920
        set {_money} to player's bank account
        set {_wealth} to {_money} * 0.01
        #6921
        set {fly.price} to 10
        broadcast "%{_money}%, %{_wealth}%, %{fly.price}-(money of player)%"
commented

@zopn333 can you send the full result of /sk info please?

微信截图_20240719094605

commented

I've found a solution to it, just because {_money} is not a number. I parsed it as number then everything works again. But shouldn't bank account be a number?

commented

well money is technically money, which is like a number but with some info about currency. The weird thing is that we cannot replicate this error at all when we test.