<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.computercraft.info/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tomass1996</id>
		<title>ComputerCraft Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://www.computercraft.info/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tomass1996"/>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/Special:Contributions/Tomass1996"/>
		<updated>2026-07-11T23:50:08Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=String_(API)&amp;diff=4669</id>
		<title>String (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=String_(API)&amp;diff=4669"/>
				<updated>2012-12-04T20:05:59Z</updated>
		
		<summary type="html">&lt;p&gt;Tomass1996: Undo revision 4668 by 85.172.4.154 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The string API is a default Lua 5.1 API as defined [http://www.lua.org/manual/5.1/manual.html#5.4 here]. Please list any non-working functions below.&lt;br /&gt;
&lt;br /&gt;
==Non-Working Functions==&lt;br /&gt;
&lt;br /&gt;
===string.gmatch(string, pattern)===&lt;br /&gt;
&lt;br /&gt;
Using any quantifier other than + will cause it to hang if that quantifier applies to the whole pattern and that pattern does not match the whole string.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;quot;abcdef&amp;quot;:gmatch(&amp;quot;%a*&amp;quot;)   -- Works&lt;br /&gt;
&amp;quot;abc=def&amp;quot;:gmatch(&amp;quot;%a*&amp;quot;)   -- Hang&lt;br /&gt;
&amp;quot;abc=def&amp;quot;:gmatch(&amp;quot;%a.*&amp;quot;)  -- Works&lt;br /&gt;
&amp;quot;abc=def&amp;quot;:gmatch(&amp;quot;[%a.]*&amp;quot;)  -- Hang&lt;br /&gt;
&amp;quot;abc=def&amp;quot;:gmatch(&amp;quot;[^=]*&amp;quot;)  -- Hang&lt;br /&gt;
&amp;quot;abc=def&amp;quot;:gmatch(&amp;quot;([^=]*)=?&amp;quot;) -- Works (Note: This produces the same result as the above pattern should)&lt;br /&gt;
&amp;quot;abcdef&amp;quot;:gmatch(&amp;quot;[^=]*&amp;quot;)  -- Works&lt;br /&gt;
&amp;quot;abc=def&amp;quot;:gmatch(&amp;quot;[^=]*=&amp;quot;)  -- Works&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===string.sub / string.find ===&lt;br /&gt;
&lt;br /&gt;
Both string.sub and string.find work on their own, but calling string.find on a string returned by string.sub will return the index of the character in the original string, not the sub string you are referencing.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local testString = &amp;quot;This is a sample string&amp;quot;;&lt;br /&gt;
local testSubString = string.sub(testString,5);&lt;br /&gt;
&lt;br /&gt;
local indexOfSample = string.find(testSubString,&amp;quot;sample&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
indexOfSample is returned 11 instead of the expected 7&lt;br /&gt;
&lt;br /&gt;
Concatenating a blank string onto the end of the string causes new memory to be allocated and works properly again&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local testString = &amp;quot;This is a sample string&amp;quot;;&lt;br /&gt;
local testSubString = string.sub(testString,5);&lt;br /&gt;
&lt;br /&gt;
local indexOfSample = string.find(testSubString..&amp;quot;&amp;quot;,&amp;quot;sample&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is also a problem with using string.find on command line arguments, as this returns the index in the full command path instead of the specific argument.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Tomass1996</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Category:APIs&amp;diff=4667</id>
		<title>Category:APIs</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Category:APIs&amp;diff=4667"/>
				<updated>2012-12-04T19:55:39Z</updated>
		
		<summary type="html">&lt;p&gt;Tomass1996: Undo revision 4666 by 217.13.237.34 (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Apis.png|thumb|350px|API's being listed with the &amp;quot;apis&amp;quot; command run in a computer.]]An API (Application Programming Interface) is a collection of code that, rather than being run directly by the user as a program, is meant to be used by other programs. This is different from a function in that an API may contain many functions that perform related tasks; the API groups them together.  It is a library of functions.&lt;br /&gt;
There are two reasons why one might want to use an API:&lt;br /&gt;
* The API may provide a function that you could write yourself if you had to, but using the one from the API means you don't have to do that work.&lt;br /&gt;
	&lt;br /&gt;
* The API may provide something it's impossible to do yourself because it has to be done in Java rather than Lua.&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
ComputerCraft itself ships with a collection of APIs of both types. For example:&lt;br /&gt;
	&lt;br /&gt;
* The [[color (API)|color API]] provides names for the various numbers used in RedPower bundled cable, and functions that manipulate those numbers. The names for the numbers are just variables, and the functions are written in Lua (you can find this in &amp;quot;rom/apis/colors&amp;quot;). You could write the same variables and functions in your own code if you wanted, but using the API saves you from doing that.&lt;br /&gt;
	&lt;br /&gt;
* The [[fs (API)|fs API]] provides functions to work with files. You couldn't write the functions from this API in Lua because they have to access the corresponding files in your real computer (the one running Minecraft), and the only way to do that from Lua is… through the fs API (or the [[IO (API)|io API]], but that's just a wrapper around fs).&lt;br /&gt;
	&lt;br /&gt;
All the stock APIs of the first kind, those that are implemented in Lua, can be found in your &amp;quot;mods/ComputerCraft/lua/rom/apis&amp;quot; directory. Inside Minecraft, on a ComputerCraft computer, these appear in the directory &amp;quot;rom/apis&amp;quot;. All the built-in APIs of both kinds (Lua and Java) are automatically loaded, so you don't have to use &amp;quot;[[OS (API)|os]].loadAPI&amp;quot; on them.&lt;br /&gt;
&lt;br /&gt;
ComputerCraft mods, for example mods that add custom peripherals, might also add APIs that help you work with those peripherals.&lt;br /&gt;
&lt;br /&gt;
You can view a list of un-official API's at the [[:Category:Unofficial_APIs]] page.&lt;br /&gt;
&lt;br /&gt;
Finally, you might find APIs written by other people that you can download, or you might write APIs yourself if you'll be using a function in many different programs and don't want to keep rewriting it. If you're playing single-player or you're running the multiplayer server, you can add those APIs to &amp;quot;rom/apis&amp;quot; and they will automatically be loaded on every computer in the world. Normally, though, you would leave the APIs somewhere else and use &amp;quot;os.loadAPI&amp;quot; to make them available to your program.&lt;br /&gt;
&lt;br /&gt;
You can see a list of APIs built-in to ComputerCraft by typing &amp;quot;apis&amp;quot; in the terminal.&lt;br /&gt;
&lt;br /&gt;
[[Category:Lists]]&lt;/div&gt;</summary>
		<author><name>Tomass1996</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Vector_(API)&amp;diff=2778</id>
		<title>Vector (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Vector_(API)&amp;diff=2778"/>
				<updated>2012-09-02T00:52:14Z</updated>
		
		<summary type="html">&lt;p&gt;Tomass1996: Error in info for mul function&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The vector API provides methods to create and manipulate vectors.  An introduction to vectors can be found on [http://en.wikipedia.org/wiki/Euclidean_vector Wikipedia].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot; style=&amp;quot;text-align: center; background: #DDDDDD&amp;quot;|Static methods&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;text-align: center; background: #EFEFEF&amp;quot; width=&amp;quot;200px&amp;quot;|Method name&lt;br /&gt;
|style=&amp;quot;text-align: center; background: #EFEFEF&amp;quot; width=&amp;quot;*&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
|vector.new(x, y, z)&lt;br /&gt;
|Creates a vector.&amp;lt;br /&amp;gt;&lt;br /&gt;
''@param'' '''x, y, z''' the vector coordinates&amp;lt;br /&amp;gt;&lt;br /&gt;
''@return'' the created vector&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot; style=&amp;quot;text-align: center; background: #DDDDDD&amp;quot;|Object methods&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;text-align: center; background: #EFEFEF&amp;quot; width=&amp;quot;200px&amp;quot;|Method name&lt;br /&gt;
|style=&amp;quot;text-align: center; background: #EFEFEF&amp;quot; width=&amp;quot;*&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
|vectorA:add(vectorB)&lt;br /&gt;
|Adds vectorB to vectorA and returns the resulted vector. Can also be used by writing vectorA + vectorB.&lt;br /&gt;
|-&lt;br /&gt;
|vectorA:sub(vectorB)&lt;br /&gt;
|Subtracts vectorB to vectorA and returns the resulted vector. Can also be used by writing vectorA - vectorB.&lt;br /&gt;
|-&lt;br /&gt;
|vectorA:mul(n)&lt;br /&gt;
|Scalar multiplies vectorA with n and returns the resulted vector. Can also be used by writing vectorA * n.&lt;br /&gt;
|-&lt;br /&gt;
|vectorA:dot(vectorB)&lt;br /&gt;
|Returns the dot product of vectorA and vectorB.&lt;br /&gt;
|-&lt;br /&gt;
|vectorA:cross(vectorB)&lt;br /&gt;
|Returns the vector which resulted in the cross product of vectorA and vectorB.&lt;br /&gt;
|-&lt;br /&gt;
|vectorA:length()&lt;br /&gt;
|Returns the vector's length.&lt;br /&gt;
|-&lt;br /&gt;
|vectorA:normalize()&lt;br /&gt;
|Normalizes the vector and returns the result as a new vector.&lt;br /&gt;
|-&lt;br /&gt;
|vectorA:round()&lt;br /&gt;
|Rounds the vector coordinates to the nearest integers and returns the result as a new vector.&lt;br /&gt;
|-&lt;br /&gt;
|vectorA:tostring()&lt;br /&gt;
|Returns a string representation of the vector in the form of &amp;quot;x,y,z&amp;quot;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Tomass1996</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=HTTP_(API)&amp;diff=2091</id>
		<title>HTTP (API)</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=HTTP_(API)&amp;diff=2091"/>
				<updated>2012-07-12T04:08:23Z</updated>
		
		<summary type="html">&lt;p&gt;Tomass1996: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| '''The HTTP API must be enabled in mod_ComputerCraft.cfg before being used. To enable it open .minecraft/config/mod_ComputerCraft.cfg and change enableAPI_http=0 to enableAPI_http=1.'''&lt;br /&gt;
|}&lt;br /&gt;
The HTTP API allows interfacing with websites and downloading from them.&lt;br /&gt;
&lt;br /&gt;
=Methods=&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!style=&amp;quot;background:#EEE&amp;quot; width=&amp;quot;200px&amp;quot;|Method name&lt;br /&gt;
!style=&amp;quot;background:#EEE&amp;quot; width=&amp;quot;*&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
| [[http.request]]( url, *postData )&amp;lt;br /&amp;gt;&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [[http.get]]( url )&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [[http.post]]( url, postData )&amp;lt;br /&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| * = Optional&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A period of time after a http.request() call is made, a &amp;quot;http_success&amp;quot; or &amp;quot;http_failure&amp;quot; event will be raised to os.pullEvent(). Arguments are the URL and a file handle if successful. http.get() blocks until this event is fired.&lt;br /&gt;
&lt;br /&gt;
[[Category:APIs]]&lt;/div&gt;</summary>
		<author><name>Tomass1996</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Turtle&amp;diff=362</id>
		<title>Turtle</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Turtle&amp;diff=362"/>
				<updated>2012-02-24T03:21:56Z</updated>
		
		<summary type="html">&lt;p&gt;Tomass1996: Added Fuel Description ~tomass1996&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Turtles are essentially robots. They will be in the 1.3 update. They run on TurtleOS. In 1.3, it has been hypothesized by the creator that they may only be able to place blocks, break them, and use a pick-axe as tools for the base 1.3. They can be coded to place blocks, or move. Their programs are stored on floppy disks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Fuel:''' ==&lt;br /&gt;
&lt;br /&gt;
Turtles are equipped with a state of the art Waste-&amp;gt;Fuel quantum ionizing engine.&lt;br /&gt;
Meaning no need for extra fuel/charging.&lt;br /&gt;
The initial redstone in the recipe for the computer which is then used in its recipe,&lt;br /&gt;
Is the &amp;quot;start up&amp;quot; fuel, It's emmisions and waste are then converted back into fuel,&lt;br /&gt;
By the ionizer making a huge circle of Waste-&amp;gt;Fuel-&amp;gt;Waste-&amp;gt;Fuel...&lt;br /&gt;
Therefore there is no need for external powering. &lt;br /&gt;
&lt;br /&gt;
[[Category:Blocks]]&lt;/div&gt;</summary>
		<author><name>Tomass1996</name></author>	</entry>

	</feed>