Loading...
  OR  Zero-K Name:    Password:   

Post edit history

error on tweak defs load

To display differences between versions, select one or more edits in the list using checkboxes and click "diff selected"
Post edit history
Date Editor Before After
2/6/2024 1:37:33 PMAUrankSmokeDragon before revert after revert
2/6/2024 1:31:43 PMAUrankSmokeDragon before revert after revert
2/6/2024 1:31:17 PMAUrankSmokeDragon before revert after revert
Before After
1 hello im having another problem again =P 1 hello im having another problem again =P
2 [spoiler] 2 [spoiler]
3 i can get this to work: 3 i can get this to work:
4 \n 4 \n
5 [q]{{{ 5 [q]{{{
6 \n 6 \n
7 energygeo = { 7 energygeo = {
8 customParams = { 8 customParams = {
9 pylonrange = 500, 9 pylonrange = 500,
10 }, 10 },
11 }, 11 },
12 \n 12 \n
13 }}}[/q] 13 }}}[/q]
14 \n 14 \n
15 but not this: 15 but not this:
16 \n 16 \n
17 [q]{{{ 17 [q]{{{
18 \n 18 \n
19 for name, ud in pairs(UnitDefs) do 19 for name, ud in pairs(UnitDefs) do
20 if ud.customparams then 20 if ud.customparams then
21 for _, cp in pairs(ud.customparams) do 21 for _, cp in pairs(ud.customparams) do
22 if cp.pylonrange then 22 if cp.pylonrange then
23 cp.pylonrange = cp.pylonrange * 4 23 cp.pylonrange = cp.pylonrange * 4
24 end 24 end
25 end 25 end
26 end 26 end
27 end 27 end
28 \n 28 \n
29 }}}[/q] 29 }}}[/q]
30 [/spoiler] 30 [/spoiler]
31 \n
31 it gave me an error something like attempt to index 'cp' (a number value) 32 it gave me an error something like attempt to index 'cp' (a number value)
32 \n 33 \n
33 so after some research i replaced pairs with ipairs and it doesnt give any errors but sadly also wont work 34 so after some research i replaced pairs with ipairs and it doesnt give any errors but sadly also wont work
35 \n
36 the odd thing is i cant seem to get any code that affects customparams to work in batch
37 \n
38 can someone give me a clue if its regarding [q]{{{ _, }}}[/q]
34 \n 39 \n
35 can anyone please help me? 40 can anyone please help me?
36 \n 41 \n
37 thanks. 42 thanks.