-
Notifications
You must be signed in to change notification settings - Fork 148
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
Fix RPT issue in PFH main Loop #171
Conversation
@@ -26,7 +26,9 @@ Author: | |||
|
|||
params ["_publicHandle"]; | |||
private "_handle"; | |||
if (isNil "_publicHandle" || (_publicHandle < 0)) exitWith {}; // Nil/no handle, nil action | |||
if ((isNil "_publicHandle" || (_publicHandle < 0)) && {(count GVAR(PFHhandles)) < _publicHandle}) exitWith { // Nil/no handle, nil action or handle is larger than Public Handle Array | |||
WARNING("PFH ID allready Removed or handle Not Exist or handle is smaller than 0"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PFH ID already removed or handle does not exist or handle is smaller than 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd go with Invalid or not existing PFH ID.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's even better.
ok i and @jonpas tested it no issues found |
👍 |
fix RTP issue in PFH main Loop
@@ -25,8 +25,12 @@ Author: | |||
#include "script_component.hpp" | |||
|
|||
params ["_publicHandle"]; | |||
|
|||
if (isNil "_publicHandle" || {(_publicHandle < 0)} || {!((count GVAR(PFHhandles)) >= _publicHandle)}) exitWith { // Nil/no handle, nil action or handle is larger than Public Handle Array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be {(count GVAR(PFHhandles) <= _publicHandle)}
?
If the count is 0, and the _publicHandle is 0, you want it to be true and exit.
@PabstMirror @jokoho48 |
No description provided.