Editing Updates

From MINR.ORG WIKI

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 946: Line 946:
 
: They are automatically created for every non-list type.
 
: They are automatically created for every non-list type.
 
: Lists are defined using X[], where X[] is a list of type X (e.g. Int[]).
 
: Lists are defined using X[], where X[] is a list of type X (e.g. Int[]).
: Lists can be initialised with X[a, b, ..., z]. (Where a, b, ..., z are zero, one, or more instances of X)
+
: Lists can be initialised with X[a, b, ..., z].
 
: Values can be retrieved using X[index]; to set a value simply assign to this (e.g. X[0] = 1).
 
: Values can be retrieved using X[index]; to set a value simply assign to this (e.g. X[0] = 1).
 
: List indicies are zero-based.
 
: List indicies are zero-based.
 
: To append to a list, simply assign a value to an index one greater than the last item in the list.
 
: To append to a list, simply assign a value to an index one greater than the last item in the list.
:: e.g., if @define Int[] x = Int[1, 2, 3], append to x with @var x[x.length()] = 4.
+
:: e.g. if @define Int[] x = Int[1, 2, 3], append to x with @var x[x.length()] = 4.
 
: Accessing an out of bound index will yield an IndexOutOfBoundsException (which will terminate the script).
 
: Accessing an out of bound index will yield an IndexOutOfBoundsException (which will terminate the script).
 
: Lists have the following methods:
 
: Lists have the following methods:
Line 961: Line 961:
  
 
; List Namespace
 
; List Namespace
: A range() function was added to a new list namespace as a convenience.
+
: A range() function was added to a new list namespace as a convience.
 
: Int[] range(Int start, Int end) will generate a list of numbers from start (inclusive) to end (exclusive).
 
: Int[] range(Int start, Int end) will generate a list of numbers from start (inclusive) to end (exclusive).
 
:: This allows you to iterate through every index in a list with @for Int i in range(0, list.length())
 
:: This allows you to iterate through every index in a list with @for Int i in range(0, list.length())
Line 974: Line 974:
 
::: @player <nowiki>{{i}}</nowiki>
 
::: @player <nowiki>{{i}}</nowiki>
 
:: @done
 
:: @done
: To loop through a range of numbers (like for (int i = 0; i < 10; i++)), use list::range().
+
: To loop through a range of numbers (like for (int i = 0; i < 10; i++)), use List::range().
 
:: @for Int i in range(0, 10)
 
:: @for Int i in range(0, 10)
  
  
 
; Relative Variables
 
; Relative Variables
: It is now possible to retrieve the value of a relative variable for specific players.
+
: It is now possible to retrieve a value of a relative variable for specific players.
: Simply use relativeVar[Player]. (Where Player is an instance of a Player type: e.g., Player("rickyboy320"))
+
: Simply use relativeVar[Player].
: Note that as this requires a Player instance, UUIDs will be required for retrieving values when players are offline. (Will fail otherwise)
+
: Note that as this requires a Player object, UUIDs will be required for retrieving values when players are offline.
: Like lists, assigning to relativeVar[Player] will set their value.
+
: Like lists, assigning to relative_var[Player] will set their value.
  
  
 
; Formatting
 
; Formatting
: Whitespace will now be preserved when importing from Hastebin, and will be exported as well.
+
: Whitespace will now be preserved when importing from Hastebin, and will exported as well.
  
  
Line 1,015: Line 1,015:
  
 
==== Bugfixes ====
 
==== Bugfixes ====
: Fixed c_dric's bug, where setting a field would spawn multiple script runners (causing delays to be skipped).
+
: Fixed c_dric's bug (?)
 
: Fixed tab-completion of namespaces only showing namespaces that begin with lowercase letters.
 
: Fixed tab-completion of namespaces only showing namespaces that begin with lowercase letters.
  
  
 
== 10.3 - Cosmetics Part 2 ==
 
== 10.3 - Cosmetics Part 2 ==
 +
 +
=== 10.3.7 (2019/11/??) ===
 +
==== Bugfixes ====
 +
: Fixed a player's challenge invalidation state being saved to and overwrite their map invalidation state.
 +
  
 
=== 10.3.6 (2019/10/30) ===
 
=== 10.3.6 (2019/10/30) ===

Please note that all contributions to MINR.ORG WIKI may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see MINR.ORG WIKI:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)