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

Warning, variable inside function is not used #1014

Open
A1mDev opened this issue Nov 30, 2024 · 0 comments
Open

Warning, variable inside function is not used #1014

A1mDev opened this issue Nov 30, 2024 · 0 comments

Comments

@A1mDev
Copy link

A1mDev commented Nov 30, 2024

Everything would be fine, but inside sourcemod there are prototypes of functions, for example for timers, the compiler starts to complain when the code creating timers or using tracing is commented out. Because the function has access modifier 'stock', the compiler should not complain in this case.
Timer:

    //int projectile = L4D2_VomitJarPrj(client, vPos, vAng);
    //CreateTimer(1.0, TimerDetonateVomitjar, EntIndexToEntRef(projectile));
left4dhooks_test.sp(2383) : error 203: symbol never used: "timer"
2383 | stock Action TimerDetonate(Handle timer, int entity)

Or for tracing:

    //Handle trace = TR_TraceRayFilterEx(vPos, vAng, MASK_SHOT, RayType_Infinite, TraceFilter, client)
left4dhooks_test.sp(6134) : error 203: symbol never used: "contentsMask"
6134 | stock bool TraceFilter(int entity, int contentsMask, int client)
@A1mDev A1mDev closed this as completed Nov 30, 2024
@A1mDev A1mDev reopened this Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant