Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skript Crashed while getting player's money #6920

Open
1 task done
zopn333 opened this issue Jul 18, 2024 · 7 comments
Open
1 task done

Skript Crashed while getting player's money #6920

zopn333 opened this issue Jul 18, 2024 · 7 comments
Assignees
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. investigating The core developers are currently investigating this issue. Usually used for complex cases.

Comments

@zopn333
Copy link

zopn333 commented Jul 18, 2024

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.
@sovdeeth
Copy link
Member

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

@sovdeeth sovdeeth added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Jul 18, 2024
@UnderscoreTud
Copy link
Member

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

I will take a look later

@UnderscoreTud UnderscoreTud self-assigned this Jul 18, 2024
@UnderscoreTud UnderscoreTud added the investigating The core developers are currently investigating this issue. Usually used for complex cases. label Jul 18, 2024
@sovdeeth
Copy link
Member

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

@sovdeeth
Copy link
Member

sovdeeth commented Jul 18, 2024

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)%"

@zopn333
Copy link
Author

zopn333 commented Jul 19, 2024

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

微信截图_20240719094605

@zopn333
Copy link
Author

zopn333 commented Jul 19, 2024

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?

@sovdeeth
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. investigating The core developers are currently investigating this issue. Usually used for complex cases.
Projects
None yet
Development

No branches or pull requests

3 participants