build que?
Moderator: Moderators
build que?
How do I get at the current build que, find out what is currently being built, what is the que count etc?
Re: build que?
manger à la fortune du pot:
Spring.GetUnitIsBuilding and http://springrts.com/wiki/Lua_SyncedRead#CommandQueues
Spring.GetUnitIsBuilding and http://springrts.com/wiki/Lua_SyncedRead#CommandQueues
Re: build que?
Actually you can't write ¿que?, it must be ¿qué?.det wrote:¿que?
que = conjuction = "that" (he said that he would come)
qué = interrogative pronoun = "what?" (what did he say)
- Prominence
- Posts: 97
- Joined: 24 Jun 2008, 07:21
Re: build que?
You forgot to include abbreviation for Quebec.Jools wrote:Actually you can't write ¿que?, it must be ¿qué?.det wrote:¿que?
que = conjuction = "that" (he said that he would come)
qué = interrogative pronoun = "what?" (what did he say)
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: build que?
Factory build queues are extremely broken. Check Integral Menu for examples of buildqueues and haxy workaround required to read and edit them.
Unit build queues are a bit less broken but still suck because CMD.SET_WANTED_MAX_SPEED is a really really annoying implementation of it's feature.
Unit build queues are a bit less broken but still suck because CMD.SET_WANTED_MAX_SPEED is a really really annoying implementation of it's feature.
Re: build que?
bullshitGoogle_Frog wrote:Factory build queues are extremely broken. Check Integral Menu for examples of buildqueues and haxy workaround required to read and edit them.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: build que?
queue evendet wrote:¿que?
Re: build que?
Care to explain jk? Not disagreeing, just want to understand what google is talking about and why it is wrongjK wrote:bullshitGoogle_Frog wrote:Factory build queues are extremely broken. Check Integral Menu for examples of buildqueues and haxy workaround required to read and edit them.
Re: build que?
It's not my job to further extend my statement.
It was googlefrog who made a clumsy statement w/o any arguments.
I know the functions work fine period
It was googlefrog who made a clumsy statement w/o any arguments.
I know the functions work fine period
Re: build que?
jK wrote:It's not my job to further extend my statement.
It was googlefrog who made a clumsy statement w/o any arguments.
I know the functions work fine period
The functions may work as intended, I think google was implying that the architect is at fault, not the bricklayer.
Re: build que?
Ok, so then how is this question:
Google, what is the expected behavior in your eyes and what happens? What is undesired, what is desired?
Google, what is the expected behavior in your eyes and what happens? What is undesired, what is desired?
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: build que?
I don't recall many specifics as I worked with them 15 months ago. According to these comments if you remove units from a queue they are left behind with ID 0. There was a bit of unexpected stuff like that so just be wary of them.
Re: build que?
get build queue
Traverse
result
Code: Select all
local buildQueue = spGetUnitCommands(unitID)
if buildQueue ~= nil then
recursiveTableReader(buildQueue, "")
end
Code: Select all
local function recursiveTableReader(currTable, dashes)
dashes = dashes .. " - "
if type(currTable) == 'table' then
for k,v in pairs(currTable) do
if (v ~= nil) then
Spring.Echo(dashes .. "table :" .. k)
recursiveTableReader(v, dashes)
end
end
else
if (k ~= nil and v ~= nil) then
Spring.Echo(dashes .. " " .. k .. " " .. v)
else
if (v ~= nil) then
Spring.Echo(dashes .. " value: " .. v)
else
if (k ~= nil) then
Spring.Echo(dashes .. " key: " .. k)
else
Spring.Echo(dashes .. " nil ")
end
end
end
end
end
What am I doing wrong here?- table :1
- - table :id
- - - nil
- - table :tag
- - - nil
- - table :options
- - - table :coded
- - - - nil
- - - table :shift
- - - - nil
- - table :params
- - - table :1
- - - - nil
- - - table :2
- - - - nil
- - - table :3
- - - - nil
- - - table :4
- - - - nil
Re: build que?
Your recursiveTableReader() is bugged:smoth wrote:What am I doing wrong here?
Code: Select all
local function recursiveTableReader(currTable, dashes)
dashes = dashes .. " - "
if type(currTable) == 'table' then
...
recursiveTableReader(v, dashes)
...
else
if (k ~= nil and v ~= nil) then <<<<<<<<<<<<<<<<<<<<
Spring.Echo(dashes .. " " .. k .. " " .. v)
else
...
end
end
Re: build que?
So the fixed code now
get orders
get parameters
ok, now, to make sense of this.
get orders
Code: Select all
local buildQueue = spGetUnitCommands(unitID)
if buildQueue ~= nil then
for k,v in pairs(buildQueue) do
Spring.Echo("============" .. " table: " .. k .. " =============")
recursiveTableReader(v, " ")
end
end
Code: Select all
local function recursiveTableReader(currTable, dashes)
dashes = dashes .. " "
if type(currTable) == 'table' then
for k,v in pairs(currTable) do
if (v ~= nil) then
Spring.Echo(dashes .. "[" .. k .. "]")
recursiveTableReader(v, dashes)
end
end
else
if (currTable ~= nil) then
Spring.Echo(dashes .. tostring(currTable) )
end
end
end
Code: Select all
============ table: 1 =============
[id]
-33
[tag]
1
[options]
[coded]
32
[shift]
true
[params]
[1]
8880
[2]
85.338134765625
[3]
2224
[4]
0
============ table: 2 =============
[id]
70
[tag]
2
[options]
[coded]
32
[shift]
true
[params]
[1]
0
============ table: 3 =============
[id]
-32
[tag]
3
[options]
[coded]
32
[shift]
true
[params]
[1]
8728
[2]
49.150390625
[3]
2600
[4]
0
============ table: 4 =============
[id]
70
[tag]
4
[options]
[coded]
32
[shift]
true
[params]
[1]
0
============ table: 5 =============
[id]
-31
[tag]
5
[options]
[coded]
32
[shift]
true
[params]
[1]
8832
[2]
32.40234375
[3]
3024
[4]
0
============ table: 6 =============
[id]
70
[tag]
6
[options]
[coded]
32
[shift]
true
[params]
[1]
0
================================
Re: build que?
Code: Select all
============ table: 1 =============
[id]
-33
[tag]
1
[options]
[coded]
32
[shift]
true
[params]
[1]
1712
[2]
132.29370117188
[3]
1312
[4]
0
============ table: 2 =============
[id]
70
[tag]
2
[options]
[coded]
32
[shift]
true
[params]
[1]
0
============ table: 3 =============
[id]
-33
[tag]
3
[options]
[coded]
32
[shift]
true
[params]
[1]
1904
[2]
132.29370117188
[3]
1312
[4]
0
============ table: 4 =============
[id]
70
[tag]
4
[options]
[coded]
32
[shift]
true
[params]
[1]
0
============ table: 5 =============
[id]
-25
[tag]
5
[options]
[coded]
32
[shift]
true
[params]
[1]
1872
[2]
132.29370117188
[3]
1568
[4]
0
============ table: 6 =============
[id]
70
[tag]
6
[options]
[coded]
32
[shift]
true
[params]
[1]
0
================================
Re: build que?
smoth wrote:so what does any of this mean?
this might be x![1]
1712