playMaker

Author Topic: Same name global/local variable issue.  (Read 1007 times)

Gua

  • Beta Group
  • Sr. Member
  • *
  • Posts: 309
    • Andrii Vintsevych
Same name global/local variable issue.
« on: February 02, 2021, 04:30:01 PM »
v1.9.1.f7p2
Unity 2018.4.31

When you have global variable and local variable with the same name, even when type of those variables are different. There's issues. This worked fine in older versions of Playmaker.


« Last Edit: February 02, 2021, 04:55:49 PM by Gua »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Same name global/local variable issue.
« Reply #1 on: February 02, 2021, 05:38:21 PM »
Hi.
Actually in older versions i had conflicts with this as well (1.8.7+)
After i had issues with it i made sure not to use same names for globals is it might have been fixed somewhere in between version tho.

I do think that when creating a local value it should check globals and give a already exist warning as its not a good practice to use the same names for global and local
(in c# scripting this can also give errors.)