How to search for missing semicolons for noobs

Hello, how do you programmers search for missing semicolons?

I'm sorry if this question comes off as arrogant or silly.

I was told by someone on a different forum that I had missing semicolons, but I couldn't find them and then he wouldn't help me anymore when he saw I wasn't making any progress and I was open endedly wasting his time.

This language I'm posting actually isn't C++, its a pseudo C++ used for making game maps for the popular RTS PC game Age of Empires III. I am modifying the game maps.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127

  int woods2=rmCreateArea("woods2");
  rmSetAreaSize(woods2, 0.15, 0.15);
  rmSetAreaCoherence(woods2, 0.90);
  rmSetAreaLocation(woods2, 0.9, 0.1);

//rmAddAreaToClass(michiganID, classGreatLake);
  rmSetAreaBaseHeight(woods2, 0.0);
  rmSetAreaObeyWorldCircleConstraint(woods2, false);
//rmSetAreaMinBlobs(woods2, 2);
//rmSetAreaMaxBlobs(woods2, 4);
//rmSetAreaMinBlobDistance(woods2, 5);
//rmSetAreaMaxBlobDistance(woods2, 8);
  rmSetAreaSmoothDistance(woods2, 0);
  rmBuildArea(woods2); 

//Woods 2 area defined.



//East forest.

   int forestTreeID = 0;
   int numTries=6*cNumberNonGaiaPlayers;
   if (cNumberNonGaiaPlayers > 3)
      numTries=5*cNumberNonGaiaPlayers;
   int failCount=0;
   for (i=0; <numTries)
   {   
      // int forest=rmCreateArea("forest "+i, rmAreaID("big continent"));//-old
      int medForest2=rmCreateArea("medForest2 "+i, rmAreaID("woods2"));
      rmSetAreaWarnFailure(medForest2, false);
      rmAddAreaToClass(medForest2, rmClassID("classForest"));  
  
  
  //Make like Rockies ES script now with no blobs and more constraints.
  
  
      // rmSetAreaSize(forest, rmAreaTilesToFraction(150), rmAreaTilesToFraction(400));//-old
  //rmSetAreaSize(medForest2, rmAreaTilesToFraction(1200), rmAreaTilesToFraction(1600));//-No
  //You can't have a forest area larger than the map size silly...
  //rmSetAreaSize(medForest2, rmAreaTilesToFraction(150), rmAreaTilesToFraction(150));//-No
  //1200*.15=180
  //The woods1 and woods2 areas already overlap towncenters, mines, and berries, so the forest areas need to be smaller.
  //The blob distance also needs to be smaller.
  //4*70=280, but the woods1 and woods2 areas are each only 180
  //180/4=45, but remember that the forest areas need to be small.
  //Forest area of size 90 theoretically gives a 50% chance that it will place.
  //rmSetAreaSize(medForest2, rmAreaTilesToFraction(90), rmAreaTilesToFraction(90));//
      rmSetAreaSize(medForest2, rmAreaTilesToFraction(270), rmAreaTilesToFraction(270));
      //Made map 4 times bigger so make everything forest also 4 times bigger to see if it places.  
      rmSetAreaForestType(medForest2, "rockies forest");
      rmSetAreaForestDensity(medForest2, 0.8);
      rmSetAreaForestClumpiness(medForest2, 0.6);
      // rmSetAreaForestUnderbrush(forest, 0.0);//-old
  rmSetAreaForestUnderbrush(medForest2, 0.6);
      // rmSetAreaMinBlobs(forest, 1);//-old
      // rmSetAreaMaxBlobs(forest, 5);//-old
      // rmSetAreaMinBlobDistance(forest, 16.0);//-old
      // rmSetAreaMaxBlobDistance(forest, 70.0);//-old
  //rmSetAreaMinBlobs(medForest2, 4);//-old
      //rmSetAreaMaxBlobs(medForest2, 20);//-old
  //Try less blobs.
  //rmSetAreaMinBlobs(medForest2, 4);//
      //rmSetAreaMaxBlobs(medForest2, 4); //

      //Got rid of blobs.
  
      //rmSetAreaMinBlobDistance(medForest2, 16.0);//-No
      //rmSetAreaMaxBlobDistance(medForest2, 70.0);//-No
  //90/4=22.5
  //blob distance of 12.25 gives a 50% theoretical chance that they will place.
      //rmSetAreaMinBlobDistance(medForest2, 12);//
      //rmSetAreaMaxBlobDistance(medForest2, 12);//
  //rmSetAreaMinBlobDistance(medForest2, 48);//
      //rmSetAreaMaxBlobDistance(medForest2, 48);//
  
      //Nope, map still failed to load.
      //but it still didn't place, so the only thing I can think of is
  //that each blob must actually be bigger than 12 so the map crashes if you try to put blobs closer to each other than the size of each blob.  
     
 //Is there a way to turn on the map grid in the game that doesn't require "ctrl+b"?
  //My "b" key on my laptop doesn't work and I must copy and paste "b" 's.
  
  //I would like to look at my blobs in the scenario editor to see how large they are, and I would like to look at a working version of my map
  //with no forest to see what grid area is left available for me to place forests that does not place forests on top of tc's, mines, berry bushes,
  //natives, trade sockets, and starting units.
      
  //So then I can do calculations to see what the minimum size of my map needs to be to fit in forest.
      
  //I've actually never placed forest on a map this small before.
      //I usually create really HUGE maps. Like I think the map in my signature is in the hundreds of thousands of tiles
  //if I remember correctly, but the placement of the blobs in that map isn't very good.
  //It leaves HUGE open spaces between each blob, which is not intentional.
  
  //Added more constraints//
  
  rmSetAreaCoherence(medForest2, 0.4);
      rmSetAreaSmoothDistance(medForest2, 0);
      //rmAddAreaToClass(medForest2, rmClassID("classForest")); // - Moved higher up in script.
      rmAddAreaConstraint(medForest2, forestConstraint);
      rmAddAreaConstraint(medForest2, avoidAll);
      rmAddAreaConstraint(medForest2, forestvsTC);
      rmAddAreaConstraint(medForest2, forestvsCW); 
      rmAddAreaConstraint(medForest2, longAvoidImpassableLand); 
      rmAddAreaConstraint(medForest2, avoidTradeRoute);
  rmSetAreaObeyWorldCircleConstraint(westForest, false);
  rmAddAreaConstraint(westForest, avoidImportantItemForest);// DAL added, to try and make sure natives got on the map w/o override.
  rmAddAreaConstraint(westForest, playerConstraintForest);// DAL adeed, to keep forests away from the player.
  rmAddAreaConstraint(westForest, forestVsForestConstraint);// DAL adeed, to keep forests away from each other.
  rmAddAreaConstraint(westForest, avoidSocket);
  rmAddAreaConstraint(westForest, avoidCoin);
  rmAddAreaConstraint(westForest, avoidStartingUnits);  

      if(rmBuildArea(medForest2)==false)
       {
         // Stop trying once we fail 3 times in a row.
         failCount++;
         if(failCount==5)
            break;
       }
      else
         failCount=0; 
    }      

   //Text
   rmSetStatusText("",0.60);  
My compiler tells me which lines.
Last edited on
maybe that someone in other forum is wrong...
and my compiler to, i have code::blocks and it gives error like this:
line

some line error: expected ';' before ...
The for on line 28 looks funky.

Hello, how do you programmers search for missing semicolons?

Reading the compiler error.
some line error: expected ';' before ...

without a line number? That's a naff compiler/ide then.

i'd expect something like:
source.cpp(155): error C2143: syntax error : missing ';' before '}'

where 155 is the line number i deleted a semi-colon from as a test.
Topic archived. No new replies allowed.