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
Is your feature request related to a problem? Please describe.
Add another argument to setElementData like "bool sealType" which will make element data type can not be set after. For example:
setElementData(localPlayer, "number", 1, sealType=true) -- initial set, everything okeysetElementData(localPlayer, "number", 2, sealType=true) -- "seal" is ignored in this case, value changed to 2 because previously it was number, now this is numbersetElementData(localPlayer, "number", false) -- error, unable to change because expected "number"removeElementData(localPlayer, "number"); -- or destroy element to change element data typesetElementData(localPlayer, "number", false, sealType=true ) -- ok, now this is booleansetElementData(localPlayer, "number", 1 ) -- error, expected boolean, got number
And make this hard error okey?
Describe the solution you'd like
don't use setElementData
Describe alternatives you've considered
don't use setElementData
Additional context
setElementData = evil, but i will propose more brillant improvments to this function that is root of most problems 😘
Security Policy
I have read and understood the Security Policy and this issue is not about a cheat or security vulnerability.
The text was updated successfully, but these errors were encountered:
hey the idea of adding a sealType option to setElementData seems really interesting and useful. It could be a good security measure to prevent potential errors when trying to accidentally change data types. I have a few questions:
The exact purpose and the conditions under which this sealType feature would be activated should be clarified.
For example:
1- What will happen if a new value is assigned to a sealed data type? Will it trigger a warning or an error?
2- Will this feature apply to all data types, or are you planning to use it only for specific types?
Defining these clearly will make both the development process and the documentation much easier.
First time element data get set should let you set type.
And indeed, it could decrease amount of errors you make, you may don't know that certain script set some element data incorrectly.
Is your feature request related to a problem? Please describe.
Add another argument to setElementData like "bool sealType" which will make element data type can not be set after. For example:
And make this hard error okey?
Describe the solution you'd like
don't use setElementData
Describe alternatives you've considered
don't use setElementData
Additional context
setElementData = evil, but i will propose more brillant improvments to this function that is root of most problems 😘
Security Policy
The text was updated successfully, but these errors were encountered: