Queue Shared function

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

This function was added in version: 0.1.0

Queue is a collection, with pattern first in first out.

Syntax

queue queue()

Example

addEventHandler("onInit", function(pid)
{
	local test_queue = queue();
	test_queue.push(5); // Push element to the queue
	test_queue.push(8);
	test_queue.pop(); // Remove 5 from queue
});

Related functions