Added after 1 hour 42 minutes
if GetPlayerResource(1, k1) >= res1{k1+1} thenIt seems there's an error here. "attempt to call table value," or something like that. How can I fix it? (I need an array, there are many components).
New here? I'm Roha — want a quick tour?
if GetPlayerResource(1, k1) >= res1{k1+1} thenpeasant_huts_n = 0
for i,hut in GetObjectNamesByType("PEASANT_HUT") do
if GetObjectOwner(hut) == 2 then
peasant_huts_n = peasant_huts_n + 1
end
end
how does this work...?
damn, I really need to figure out how this for loop works. I just can't find the time. It's a useful thing.
Thanks again!