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 246: function hitGroupName returns an array but return type is not marked as an array #1017

Open
A1mDev opened this issue Dec 15, 2024 · 0 comments

Comments

@A1mDev
Copy link

A1mDev commented Dec 15, 2024

Warning 246: function hitGroupName returns an array but return type is not marked as an array.
Warning on old syntax, don't know if it's still supported?

public  OnPluginStart()
{
    PrintToServer("%s", hitGroupName(0));
}

stock String:hitGroupName(hitgroup)
{
    new String:tmpString[15] = "";
    switch (hitgroup)
    {
        case 0: { tmpString = "body"; }
        case 1: { tmpString = "head"; }
        case 2: { tmpString = "chest"; }
        case 3: { tmpString = "stomach"; }
        case 4: { tmpString = "left arm"; }
        case 5: { tmpString = "right arm"; }
        case 6: { tmpString = "left leg"; }
        case 7: { tmpString = "right leg"; }
        case 10: { tmpString = "???"; }
    }
    return tmpString;
}
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