Forum Discussion

Komag's avatar
Komag
Roku Guru
4 years ago
Solved

Can I no longer use "c" as a variable? <Function: c>?

Suddenly my game crashes with "Attempt to use a non-numeric array index not allowed."

My variable is:

c Integer val:24 (&h18)

But when I type ? c I get <Function: c>

What is that?

If you keep changing how BrightScript behaves you're going to break channels!

  • Komag's avatar
    Komag
    4 years ago

    I feel REALLY dumb - it was my fault! I found where I had typo'd and replaced the name a function with "c", thus creating the whole problem. Thanks for your reply anyway!

4 Replies

  • This is a HUGE pain the behind! I have hundreds of uses of c as a variable. I know I can't use m as a variable, but many many functions I've set up with a = "such and such", b = "this and that", c = "another thing", etc. I'm forced to search through a huge codebase to try to find them all!

    • renojim's avatar
      renojim
      Community Streaming Expert

      Hmm... I just sideloaded something on my Ultra 4800 that's on 10.5.0 build 4201, broke, and typed "?c" and got

      Brightscript Debugger> ?c
      Warning: operation may not be interruptible. <UNINITIALIZED>

      I don't recall seeing that warning before, but I can use 'c'.  One would hope Roku isn't using one letter functions in some library, but it doesn't appear to be something like 'm'.

      • Komag's avatar
        Komag
        Roku Guru

        I feel REALLY dumb - it was my fault! I found where I had typo'd and replaced the name a function with "c", thus creating the whole problem. Thanks for your reply anyway!