0

I have a global var, and when i use it in a function it says "isUseingPreset is not accessed Pylance".

here is the code :

isUseingPreset = False


def PresetHELLO():
    print("preset HELLO")
    env.PAYLOAD["content"] = "Hello"
    isUseingPreset = True
    reveiewInput()

photo of the error

jacob
  • 25
  • 1
  • 9
  • 1
    Does this answer your question? [Using global variables in a function](https://stackoverflow.com/questions/423379/using-global-variables-in-a-function) – Tzane Mar 02 '22 at 09:22
  • YES THANK YOU, i was stuck on this for awhile – jacob Mar 03 '22 at 01:23

0 Answers0