<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.figuramc.org/index.php?action=history&amp;feed=atom&amp;title=User%3ASlyme%2FDrafts%2FLua_Basics%2FValues</id>
	<title>User:Slyme/Drafts/Lua Basics/Values - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.figuramc.org/index.php?action=history&amp;feed=atom&amp;title=User%3ASlyme%2FDrafts%2FLua_Basics%2FValues"/>
	<link rel="alternate" type="text/html" href="https://wiki.figuramc.org/index.php?title=User:Slyme/Drafts/Lua_Basics/Values&amp;action=history"/>
	<updated>2026-06-12T07:49:49Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.figuramc.org/index.php?title=User:Slyme/Drafts/Lua_Basics/Values&amp;diff=747&amp;oldid=prev</id>
		<title>Slyme: Created page with &quot;{{Notice |content=&#039;&#039;&#039;This article is part of a larger series on the Lua Basics.&#039;&#039;&#039;&lt;br&gt; * Please check out the Lua Basics if you haven&#039;t already. * For more documents within this series, please scroll to the bottom of the page or click here. }} &#039;&#039;&#039;Values&#039;&#039;&#039; are essentially data within Lua. Values can be passed into functions as arguments and can be stored in variables for future use.  There are several different ty...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.figuramc.org/index.php?title=User:Slyme/Drafts/Lua_Basics/Values&amp;diff=747&amp;oldid=prev"/>
		<updated>2024-11-04T03:30:59Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Notice |content=&amp;#039;&amp;#039;&amp;#039;This article is part of a larger series on the [[../|Lua Basics]].&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt; * Please check out the &lt;a href=&quot;/index.php/Lua_Basics&quot; title=&quot;Lua Basics&quot;&gt;Lua Basics&lt;/a&gt; if you haven&amp;#039;t already. * For more documents within this series, please scroll to the bottom of the page or &lt;a href=&quot;#See_more&quot;&gt;click here&lt;/a&gt;. }} &amp;#039;&amp;#039;&amp;#039;Values&amp;#039;&amp;#039;&amp;#039; are essentially data within Lua. Values can be passed into &lt;a href=&quot;#Functions&quot;&gt;functions&lt;/a&gt; as arguments and can be stored in [[../Variables|variables]] for future use.  There are several different ty...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Notice&lt;br /&gt;
|content=&amp;#039;&amp;#039;&amp;#039;This article is part of a larger series on the [[../|Lua Basics]].&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
* Please check out the [[Lua Basics]] if you haven&amp;#039;t already.&lt;br /&gt;
* For more documents within this series, please scroll to the bottom of the page or [[#See more|click here]].&lt;br /&gt;
}}&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Values&amp;#039;&amp;#039;&amp;#039; are essentially data within Lua. Values can be passed into [[#Functions|functions]] as arguments and can be stored in [[../Variables|variables]] for future use.&lt;br /&gt;
&lt;br /&gt;
There are several different types of data within Lua. We&amp;#039;ll go over some of the more basic ones below.&lt;br /&gt;
== {{Type|boolean}} ==&lt;br /&gt;
Booleans store either a {{Type|true}} or {{Type|false}} value, nothing else. They can be operated on with [[../Operators#Logical_Operators|logical operators]] such as &amp;lt;code&amp;gt;and&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;or&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;not&amp;lt;/code&amp;gt;.&lt;br /&gt;
{{Script&lt;br /&gt;
|script=local a = true&lt;br /&gt;
local b = false&lt;br /&gt;
&lt;br /&gt;
print(a and b) --&amp;gt; false&lt;br /&gt;
print(a or b) --&amp;gt; true&lt;br /&gt;
print(not a) --&amp;gt; false&lt;br /&gt;
print(a and not b) --&amp;gt; true&lt;br /&gt;
}}&lt;br /&gt;
== {{Type|number}} ==&lt;br /&gt;
Numbers store any numeric value, including {{Type|integers}} and {{Type|floats}}. Numbers are primarily operated on using [[../Operators#Arithmetic_Operators|arithmetic]] (&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt;, etc.) and [[../Operators#Relational_Operators|relational]] (&amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;=&amp;lt;/code&amp;gt;, etc.) operators.&lt;br /&gt;
{{Script&lt;br /&gt;
|script=local a = 3&lt;br /&gt;
local b = 5.5&lt;br /&gt;
local c = 9&lt;br /&gt;
&lt;br /&gt;
print(a + b) --&amp;gt; 7.5&lt;br /&gt;
print(b * c) --&amp;gt; 49.5&lt;br /&gt;
print(c / a) --&amp;gt; 3&lt;br /&gt;
}}&lt;br /&gt;
== {{Type|string}} ==&lt;br /&gt;
Strings are sequences of characters usually made to form human-readable text. They can be created by wrapping characters within quotes (&amp;lt;code&amp;gt;&amp;quot;&amp;lt;/code&amp;gt;) or apostrophes/single quotes (&amp;lt;code&amp;gt;&amp;#039;&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
The character used to wrap the string, either &amp;lt;code&amp;gt;&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;#039;&amp;lt;/code&amp;gt;, cannot be normally used within the string without a syntax error. These characters can be escaped by putting a backslash (&amp;lt;code&amp;gt;\&amp;lt;/code&amp;gt;) behind them to use them as normal. Newlines are similar, however they are escaped by using &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Literal strings, wrapped using double brackets (&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[example]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;), automatically escape all characters within, including newlines. This means that literal strings can go over multiple lines, be represented as such in the value, and still not cause a syntax error.&lt;br /&gt;
&lt;br /&gt;
Strings can be manipulated using the string library, accessed either by using the &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; global variable or by using the methods of a string object.&lt;/div&gt;</summary>
		<author><name>Slyme</name></author>
	</entry>
</feed>