Game Maker Games, Articles, Tutorials & More

Game Maker Network


Howdy, Guest! Please sign in or register an account.

Print

ds_queue_repr

By Daniel · December 29, 2008

Returns a string representation of the given queue

// ds_queue_repr(id)
// Returns a string representation of the given queue

var copy, s;

copy = ds_queue_create();
ds_queue_copy(copy, argument0);

s = '';
while (!ds_queue_empty(copy)) {
  if (s != '')
    s += ', ';
  s += string(ds_queue_dequeue(copy));
}

s = '[' + s + ']';
return s;

Comments

There are no comments to display.

Post a Comment

You must be signed in to post comments.

Advertisement