CheckSlot Help

Discuss and post your mods and scenarios here for others to download.

Moderator: Vic

Post Reply
User avatar
GunnyJarhead
Posts: 27
Joined: Mon Jul 16, 2012 7:31 pm
Contact:

CheckSlot Help

Post by GunnyJarhead »

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?


Some people are still alive only because it is illegal to kill them.
User avatar
ernieschwitz
Posts: 4240
Joined: Tue Sep 15, 2009 3:46 pm
Location: Denmark

RE: CheckSlot Help

Post by ernieschwitz »

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
Creator of High Quality Scenarios for:
  • Advanced Tactics Gold
    DC: Warsaw to Paris
    DC: Community Project.
Try this Global WW2 Scenario: https://www.vrdesigns.net/scenario.php?nr=280
User avatar
ernieschwitz
Posts: 4240
Joined: Tue Sep 15, 2009 3:46 pm
Location: Denmark

RE: CheckSlot Help

Post by ernieschwitz »

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
Creator of High Quality Scenarios for:
  • Advanced Tactics Gold
    DC: Warsaw to Paris
    DC: Community Project.
Try this Global WW2 Scenario: https://www.vrdesigns.net/scenario.php?nr=280
Post Reply

Return to “Mods and Scenarios”