Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

amorai

Members
  • Content Count

    2
  • Joined

  • Last visited

Posts posted by amorai

  1. Hello,

     

    I am in the process of writing an API that is cross-platform between ComputerCraft and OpenComputers.

     

    I am easily able to identify whether the platform the API is running on is either CC or OC via a simple pcall against a CC only or OC only API function.

     

    However, I was curious to find out if there was an OpenComputer specific API function that would return me the version of OC that is currently loaded into Minecraft. The purpose for getting this information would allow my own API to adjust to the environment the user currently has loaded. This allows the developer to use my own API the same way regardless of which version of OC is currently loaded.

     

    I was hoping there was a more elegant way of identifying the OC version than wrapping a pcall function around computer.romAddress(); where a pcall failure would indicate that the loaded OC version is 1.3 or higher and a success would be an OC version that is 1.2 or lower.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.