Difference between revisions of "love.isVersionCompatible"

(Created page with "{{newin|0.10.0|010|type=function}} Gets whatever the version is compatible with current running version of LÖVE. == Function == === Synopsis === <source lang="lua"> comp...")
 
m
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{newin|[[0.10.0]]|010|type=function}}
+
{{newin|[[0.10.0]]|100|type=function}}
Gets whatever the version is compatible with current running version of LÖVE.
+
Gets whether the given version is compatible with the current running version of LÖVE.
  
 
== Function ==
 
== Function ==
Line 8: Line 8:
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
{{param|string|version|The version (for example: "0.10.1").}}
+
{{param|string|version|The version to check (for example <code>'11.3'</code> or <code>'0.10.2'</code>).}}
  
 
=== Returns ===
 
=== Returns ===
  
{{param|boolean|compatible|Whatever is the version compatible.}}
+
{{param|boolean|compatible|Whether the given version is compatible with the current running version of LÖVE.}}
  
 
== Function ==
 
== Function ==
Line 20: Line 20:
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
{{param|number|major|The major version, i.e. 0 for version 0.10.1.}}
+
{{param|number|major|The major version to check (for example <code>11</code> for 11.3 or <code>0</code> for 0.10.2).}}
{{param|number|minor|The minor version, i.e. 10 for version 0.10.1.}}
+
{{param|number|minor|The minor version to check (for example <code>3</code> for 11.3 or <code>10</code> for 0.10.2).}}
{{param|number|revision|The revision version, i.e. 1 for version 0.10.1.}}
+
{{param|number|revision|The revision of version to check (for example <code>0</code> for 11.3 or <code>2</code> for 0.10.2).}}
  
 
=== Returns ===
 
=== Returns ===
  
{{param|boolean|compatible|Whatever is the version compatible.}}
+
{{param|boolean|compatible|Whether the given version is compatible with the current running version of LÖVE.}}
  
 
== See Also ==
 
== See Also ==
Line 32: Line 32:
 
* [[love.getVersion]]
 
* [[love.getVersion]]
 
[[Category:Functions]]
 
[[Category:Functions]]
{{#set:Description=Gets whatever the version is compatible with current running version of LÖVE.}}
+
{{#set:Description=Gets whether the given version is compatible with the current running version of LÖVE.}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.isVersionCompatible}}
 
{{i18n|love.isVersionCompatible}}

Latest revision as of 10:40, 30 July 2021

Available since LÖVE 0.10.0
This function is not supported in earlier versions.

Gets whether the given version is compatible with the current running version of LÖVE.

Function

Synopsis

compatible = love.isVersionCompatible( version )

Arguments

string version
The version to check (for example '11.3' or '0.10.2').

Returns

boolean compatible
Whether the given version is compatible with the current running version of LÖVE.

Function

Synopsis

compatible = love.isVersionCompatible( major, minor, revision )

Arguments

number major
The major version to check (for example 11 for 11.3 or 0 for 0.10.2).
number minor
The minor version to check (for example 3 for 11.3 or 10 for 0.10.2).
number revision
The revision of version to check (for example 0 for 11.3 or 2 for 0.10.2).

Returns

boolean compatible
Whether the given version is compatible with the current running version of LÖVE.

See Also

Other Languages