Difference between revisions of "Object:type"

(Undo revision 2986 by Vrld (Talk))
Line 27: Line 27:
 
{{#set:Description=Gets the type of the object as a string.}}
 
{{#set:Description=Gets the type of the object as a string.}}
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
== Other Languages ==
 +
{{i18n|Object:type}}

Revision as of 19:34, 25 October 2010

Gets the type of the object as a string.

Function

Synopsis

type = Object:type()

Arguments

None.

Returns

string type
The type as a string.

Examples

Printing the type of an object

image = love.graphics.newImage("test.png")
print(image:type()) -- outputs: Image
source = love.audio.newSource("test.ogg")
print(source:type()) -- outputs: Source

See Also

Other Languages