1. This forum is obsolete and read-only. Feel free to contact us at support.keenswh.com

Program Editor errors How to fix

Discussion in 'Programming Guides and Tools' started by AC_Black, Apr 19, 2019.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. AC_Black

    AC_Black Trainee Engineer

    Messages:
    11
    Autopilot_patrol

    Program(38,25): Warning:
    'TerminalBlockExtentions.HasInventory(IMyTerminalBlock)'is obsolete: 'Use the HasInventory property.'

    This is my problem, I want to learn but cannot find HOW to replace the old code with the new codes that Keen keep changing/updating.

    I have had far too many excellent scripts broken because I am not able to fix these types of errors. Just looking for some help in the HOW TO department.

    Thanks in advance :)
     
  2. Malware

    Malware Master Engineer

    Messages:
    9,867
    First of all, as it says that's a warning, not an error. It'll still work for a while longer. However this one is very easy to change: Just change the references of

    block.HasInventory()

    to

    block.HasInventory
     
  3. AC_Black

    AC_Black Trainee Engineer

    Messages:
    11
    OK will give this a go, brb lol

    Edit: I cannot believe that it was so easy... Thank you Master Malware :)
     
    Last edited: Apr 20, 2019
Thread Status:
This last post in this thread was made more than 31 days old.