View Single Post
Old 11-29-2006, 05:05 PM   #15
BlinkBoy's Avatar

Respected User
Join Date: Dec 2003
Posts: 835

Submissions (4)

BlinkBoy has a spectacular aura about (97)BlinkBoy has a spectacular aura about (97)BlinkBoy has a spectacular aura about (97)BlinkBoy has a spectacular aura about (97)

Outstanding Tutorial


Ok, i've found some things and limitations, but also found a lil bug.

Collapse JASS:
struct domin
      integer tax = 0
      player conqueror = Player(13)
      boolean sur = false

      domin array V
      force array C

function Trig_Surrender_Settings_Actions takes nothing returns nothing
local integer f = 0
      set V[0] = domin.create()
      set V[1] = domin.create()
      set V[2] = domin.create()
      set V[3] = domin.create()
      set V[4] = domin.create()
      set V[5] = domin.create()
      set V[6] = domin.create()
      set V[7] = domin.create()
      set V[8] = domin.create()
      set V[9] = domin.create()
      set V[10] = domin.create()
      set V[11] = domin.create()
// In this way, the syntax is correct, but then if i try setting them dynamicly:
     set V[f] = domin.create()
     set f = f + 1
     exitwhen f >= 12
// This will cause a syntax error
set f = 0
    set C[f] = CreateForce()
    set f = f + 1
    exitwhen f >= 12

My first Question, will you improve the system to support dynamic arrays, with structures ?

Now a lil bug, that I found. If you set a struct variable in an if statement, it will cause a syntax error.

Collapse JASS:
if d != Player(13) and V[GetPlayerId(a)].sur == false then

so i must declare a boolean variable and give it that value
BlinkBoy is offline   Reply With Quote