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

comp_adv_output performs fixups too well #285

Open
electrovoyage opened this issue Nov 24, 2024 · 5 comments
Open

comp_adv_output performs fixups too well #285

electrovoyage opened this issue Nov 24, 2024 · 5 comments
Labels
bug done Fixed/implemented for next release

Comments

@electrovoyage
Copy link
Contributor

Trying to use comp_adv_output to format a RunScriptCode input. The parameter override is being formatted as: RunScriptCode($name, $radio_target_name, $min_proximity):
image

However, the actual output (decompiled) produced is extremely set on fixing everything up, no matter if it's already fixed up or not:
image
Not to mention it's added twice.

The output's targetname gets fixed up again for some reason, after already being fixed up by VBSP because this is an instance, and the arguments also get fixed up, even the last one, which is just the number 500. RADIO is the instance's fixup name.

Regardless of whether Target - Instance Name is set in the comp_adv_output, fixups are being done on everything.

@electrovoyage electrovoyage changed the title comp_adv_output performs too well comp_adv_output performs fixups too well Nov 24, 2024
@electrovoyage
Copy link
Contributor Author

A good solution would be adding keyvalues to force-disable fixup on a replace value.

@TeamSpen210 TeamSpen210 added bug done Fixed/implemented for next release labels Nov 25, 2024
@TeamSpen210
Copy link
Owner

Currently, fixup is done by VBSP, meaning it's done before the postcompiler can do anything. That's why the 3 different keyvalues for each exist, so you can pick which behaviour you need. I redid this logic a little though, so this will be fixed.

Just noticed something else - you'll need to add ` quotes in your format template, since right now it's going to be looking for variables not strings.

@electrovoyage
Copy link
Contributor Author

Just noticed something else - you'll need to add ` quotes in your format template, since right now it's going to be looking for variables not strings.

Would that be Init({1}, {2}, {3})? (couldn't get backslash-backtick working as a backtick escape which works in Discord markdown)

@TeamSpen210
Copy link
Owner

Yep. Maybe not for {3} since that's just a number.

@electrovoyage
Copy link
Contributor Author

Yep. Maybe not for {3} since that's just a number.

{3} doesn't really matter because the script converts it to float anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug done Fixed/implemented for next release
Projects
None yet
Development

No branches or pull requests

2 participants