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

No helping error info on new natives checks #2798

Closed
d22tny opened this issue Sep 18, 2024 · 3 comments
Closed

No helping error info on new natives checks #2798

d22tny opened this issue Sep 18, 2024 · 3 comments
Labels

Comments

@d22tny
Copy link

d22tny commented Sep 18, 2024

What happened?

Try using for example
SetPedComponentVariation with a non-existent drawable ID
it will error out like this:
error

The problem is that it is hard to identify which native has invalid arguments passed and where it is located.

Expected result

Show the wrongly used native and it's location in code.

Reproduction steps

RegisterCommand("testerror", function()
SetPedComponentVariation(PlayerPedId(), 20, 30624, 0, 0)
end)

Importancy

Slight inconvenience

Area(s)

FiveM

Specific version(s)

FiveM - client

Additional information

No response

@d22tny d22tny added bug triage Needs a preliminary assessment to determine the urgency and required action labels Sep 18, 2024
@d22tny
Copy link
Author

d22tny commented Sep 18, 2024

image
Actually on GetPedDrawableVariation it seems to be showing the correct output

@iridium-cfx
Copy link
Contributor

image

That repro shows a stacktrace for me, though I agree it is probably worth adding the native hash to the error message.

@d22tny
Copy link
Author

d22tny commented Sep 19, 2024

Yup, i tried testing as well in a clean environment and the stacktrace is there, so it's certainly a problem from my code space, i think it's because we're using LuaOOP, It's actually hard to repro since you need to have vRP2. it would be nice though, as you've said, to have the native hash added to the error message, just in case weird stuff like this happens to others, it was quite a pain finding the source of the problem, which was btw the following ( for other users using the same framework).

vRP 2 by default saves the characters drawable ID's up to 20, so everything above 12 would error out in both getting and setting.
You would already have saved in the db all the drawables from 12 to 20 which are not needed and errors out, you just need to check the index <= 11 on the customization setter function and adjust the for to be till 11 in the getter function.

@d22tny d22tny closed this as completed Sep 22, 2024
@github-actions github-actions bot removed the triage Needs a preliminary assessment to determine the urgency and required action label Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants