Blockland Welcome, Guest. Please login or register.
Did you miss your activation email?
May 29, 2017, 09:43:12 PM

Home Help Login Register
+  Blockland Forum
|-+  Blockland Forums
| |-+  Modification Help
| | |-+  [BL SOURCE CODE/REFERENCE] ServerLoadSaveFile_Start/Tick/End/Color Data
Pages: 1 2 [3]
Author Topic: [BL SOURCE CODE/REFERENCE] ServerLoadSaveFile_Start/Tick/End/Color Data  (Read 1528 times)
mctwist

« April 19, 2017, 02:38:34 PM »

Code:
function QueueSO::pop(%obj)
{
if(%obj.head != %obj.tail)
{
%obj.head--;
if(%obj.head < 0)
{
%obj.head = %obj.size-1;
%ret = %obj.val[%obj.head];
%obj.val[%obj.head] = 0;
}
}
return %ret;
}

More like this:

Code:
function QueueSO::pop(%obj)
{
if(%obj.head != %obj.tail)
{
%obj.head--;
if(%obj.head < 0)
{
%obj.head = %obj.size-1;
}
%ret = %obj.val[%obj.head];
%obj.val[%obj.head] = 0;
}
return %ret;
}
Logged
Ad Bot

Full members do not see ads

Swollow

« April 20, 2017, 09:03:15 PM »

right my bad
Logged
mctwist

« April 21, 2017, 12:09:02 AM »

Edit: thanks mctwist for catching that ♥

No problem.
Logged
Pages: 1 2 [3]  


Login with username, password and session length

Powered by SMF 1.1.20 | SMF © 2013, Simple Machines
Page created in 0.11 seconds with 14 queries.