This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Reinified's profile picture

How integrate

Started by Reinified, 29 July 2017 - 08:49 PM
Reinified #1
Posted 29 July 2017 - 10:49 PM
Is there a way to find out if the program you are running is running on a PC or a mobile (pocket pc if you will)?

Thanks in advance for any help.
Anavrins #2
Posted 29 July 2017 - 11:04 PM
There's a pocket api that doesn't contain any function, and is just there to tell you if you're running on a pocket computer.

if pocket then
  print("This is running on a pocket computer")
else
  print("You're not running on a pocket computer")
end
Edited on 29 July 2017 - 09:04 PM
CLNinja #3
Posted 29 July 2017 - 11:06 PM
There's a pocket api that doesn't contain any function, and is just there to tell you if you're running on a pocket computer.

if pocket then
  print("This is running on a pocket computer")
else
  print("You're not running on a pocket computer")
end
actually nowadays pocket does contain functions (in later builds of CC) to do with peripherals, but the same method of checking will still work either way.
Reinified #4
Posted 29 July 2017 - 11:23 PM
Thanks, solved.