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

how do I write a function to do nothing?

Started by Termanater13, 01 April 2014 - 05:37 PM
Termanater13 #1
Posted 01 April 2014 - 07:37 PM
I want to write a function that does nothing. the goal is to have a function do nothing so I can place it as a place holder for display code. so if a monitor is used mon.setTextScale() would change the scale, but if the teminal is used I can save the term API and this function into mon and mon.setTextScale() would do nothing as to not error if called.
wieselkatze #2
Posted 01 April 2014 - 07:44 PM
Shouldn't this be as easy as writing


mon.setTextScale = function()
end

Or did you have any problems with something like that?
Edited on 01 April 2014 - 05:44 PM
Termanater13 #3
Posted 01 April 2014 - 07:46 PM
I thought so, but I am currently nowhere near a instance of minecraft with computercraft installed, or on a device to run minecraft on. That and I am currently coding something that that was needed on an android tablet
apemanzilla #4
Posted 01 April 2014 - 08:11 PM
function() end