Queue.push Shared function

From Gothic 2 Online: Wiki
Jump to navigation Jump to search

This function was added in version: 0.1.0

Method push an element to the end of the queue.

Syntax

void queue.push(element value)

Required Arguments

  • value: The data, which we want to push onto the queue.

Example

addEventHandler("onInit",function(pid)
{
	local test_queue = queue();

	test_queue.push("first"); // this three lines are adding some values into queue one by one.
	test_queue.push("second");
	test_queue.push("last");

	print(test_queue[1]) // this will print "second" because "1" is a second index of the queue.

});

Related functions