RSSI code snippet not working

See parallel discussion here

Fragmenting one overarching/common question into multiple threads isn't best practice.

However, when you use Web IDE, you should click the SHOW RAW button to see more background info about the error message.
Ambiguity errors usually are caused by multiple use of the same name for different purposes and the first step to remedy such an issue is to try renaming the offending variable.