You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should not declare localized variables as global ones.
Actual Behavior
The code report detects an issue in actually localized variable, which it defines as a global one. The code report ignores if you prior localized the variable name. I actually do not know if it is a global issue related to localizing prior or just related to do blocks.
It returns an issue called: _Global function definitions are prohibited. Namespace them inside your addon's global table_.
Example:
localsplitdolocallen=string.lenlocalsub=string.sublocalmaxBytes=netchunk.maxBytesfunctionsplit(data)
locallength=len(data)
localindex=1locallast=1localchunks= {}
fori=1, lengthdoif (i-last+1) >maxBytesthenchunks[index] =sub(data, last, i)
index=index+1last=i+1endendchunks[index] =sub(data, last, length)
returnchunksendend
Result:
Reproduction Steps
1. Paste somewhere in the code the example above.
2. Run code report.
3. Check the issues.
Expected Behavior
It should not declare localized variables as global ones.
Actual Behavior
The code report detects an issue in actually localized variable, which it defines as a global one. The code report ignores if you prior localized the variable name. I actually do not know if it is a global issue related to localizing prior or just related to
do
blocks.It returns an issue called:
_Global function definitions are prohibited. Namespace them inside your addon's global table_
.Example:
Result:
Reproduction Steps
Browsers
Vivaldi
Example URL
https://www.gmodstore.com/dashboard/products/onyx-scoreboard-a-modern-scoreboard/code-reports/rkhUPOF8QBqvkzAf40Ew7g
Pivity Marketplace Version
v18.4.0
Event ID
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: