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

[BUG] _this missing from arguments when transpiling a function #165

Open
overfl0 opened this issue Mar 3, 2021 · 0 comments
Open

[BUG] _this missing from arguments when transpiling a function #165

overfl0 opened this issue Mar 3, 2021 · 0 comments
Labels
bug Error, flaw, failure or fault that causes to produce an incorrect result or crash sqc

Comments

@overfl0
Copy link

overfl0 commented Mar 3, 2021

player addEventHandler ["HandleDamage", {
    hint format ["You just sustained %1%2 damage!", ceil ((_this select 2) * 100), "%"];
}];

Gives:

player.addeventhandler("HandleDamage", function() {
    hint($"You just sustained {ceil(_this[2] * 100)}{"%"} damage!");
});
@overfl0 overfl0 added the bug Error, flaw, failure or fault that causes to produce an incorrect result or crash label Mar 3, 2021
@X39 X39 added the sqc label Dec 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Error, flaw, failure or fault that causes to produce an incorrect result or crash sqc
Projects
None yet
Development

No branches or pull requests

2 participants