build que?
Posted: 14 Jan 2012, 05:24
How do I get at the current build que, find out what is currently being built, what is the que count etc?
Actually you can't write ¿que?, it must be ¿qué?.det wrote:¿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)
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.
queue evendet wrote:¿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.
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
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
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
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
================================
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
================================
smoth wrote:so what does any of this mean?
this might be x![1]
1712