You can always do this:
codes = {}
codes.AddReplace("500","internal Server Error")
codes.AddReplace("501","not implemented")
then
error = SomeFunction() ' returns an Integer
?codes[error.toStr()]
Another option would be to build your table with a leading character:
codes = {x500:"internal Server Error",x501:"not implemented"}
then use:
?codes["x"+error.toStr()]
-JT
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.