CheckSlot Help (Full Version)

All Forums >> [New Releases from Matrix Games] >> Advanced Tactics Series >> Mods and Scenarios



Message


GunnyJarhead -> CheckSlot Help (4/19/2013 5:04:46 PM)

OK, I have assigned slots to my map. Very Basic, Sea = 0, Land = 1

Rand Location/People based on Landtype and Slot #

0) LOOPER: TempVar1 FROM 0 TO CheckMapHeight
1) LOOPER: TempVar2 FROM 0 TO CheckMapWidth
2) SETVAR: TempVar3 = CheckRandomPercent
3) CHECK: TempVar3 => 80
4) CHECK: CheckSlot(TempVar1, TempVar2, 1) == 1
5) Comment' 0=Plains,1=Sea, 2= Fields, 3=Pine, 4=Swamp, 5=LowMt, 6=HighMt, 7=Urban,8=Suburbs, 9=Capitol, 10=Forest
6) CHECK: CheckLandscapeType(TempVar1, TempVar2) == 0
7) Comment' 0=City, 1=Capitol, 2=Raw(1), 3=Oil (1), 4=Fortification (1), 5-Fort(2), 6=Fort (3), 7=Fort (0), 8=Fort (4),
8) Comment' 9=Port, 10=Airbase, 11=Airfield, 12=Gun Factory, 13=Tank Factory, 14=Shipyard, 15=Research Center, 20=Town
9) EXECUTE: ExecChangeLocationType(TempVar1, TempVar2, 0, 8)
10) END CHECK
11) END CHECK
12) END CHECK
13) END LOOPER
14) END LOOPER

I keep getting an error for line number 4 "Checkslot" I have no idea why. I have changed the slot #'s in the line back and forth so many times its ridiculous

Whats the deal? What am I doing wrong?






ernieschwitz -> RE: CheckSlot Help (4/19/2013 6:33:51 PM)

I think you have switched the x and y coordinates around.

So you are running a loop that is y coordinates and using that as x-coordinate in the slot check...

Try switching tempvar1 with tempvar2 and vice versa in the loopers




ernieschwitz -> RE: CheckSlot Help (4/19/2013 7:18:54 PM)

0) LOOPER: TempVar2 FROM 0 TO CheckMapHeight
1) LOOPER: TempVar1 FROM 0 TO CheckMapWidth

That is.

OR you could do this:

0) LOOPER: TempVar1 FROM 0 TO CheckMapWidth
1) LOOPER: TempVar2 FROM 0 TO CheckMapHeight




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.90625