c++makefilemud

Error when make, C++ 'db.c:2127: error: expected ';' before '||' token'


        if ((mob_index[ZCMD.arg1].virtual < 7999) &&
        (mob_index[ZCMD.arg1].virtual > 7899) ) {
          do {
        to_room = number(0, top_of_world);
          }
          while( (IS_SET_AR(world[to_room].room_flags,ROOM_PRIVATE))
             ||(IS_SET_AR(world[to_room].room_flags,ROOM_GODROOM))
             ||(IS_SET_AR(world[to_room].room_flags,ROOM_DEATH))
             ||(IS_SET_AR(world[to_room].room_flags,ROOM_NOMOB))
             ||(IS_SET_AR(world[to_room].room_flags,ROOM_HOUSE))
             ||(IS_SET_AR(world[to_room].room_flags,ROOM_ATRIUM))
             ||(world[to_room].sector_type == SECT_CITY)
             || (zone_table[world[to_room].zone].number == 36) )
             || (zone_table[world[to_room].zone].number == 198) )
             || (zone_table[world[to_room].zone].number == 100) )
             || (zone_table[world[to_room].zone].number == 187) )
             || (zone_table[world[to_room].zone].number == 145) )
             || (zone_table[world[to_room].zone].number == 70) )
             || (zone_table[world[to_room].zone].number == 163) );

I run a c++ based MUD or Text RPG, i'm trying to add a few thingsi nto the code. When trying to run make i get the following errors:

db.c:2127: error: expected ';' before '||' token
make[3]: *** [db.o] Error 1
make[3]: Leaving directory `/home/dpreturn/darkpawnsbuild/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/dpreturn/darkpawnsbuild/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/dpreturn/darkpawnsbuild/src'
make: *** [all-recursive] Error 1```


Solution

  • You need to count your brackets

    || (zone_table[world[to_room].zone].number == 36) )
    

    should be

    || (zone_table[world[to_room].zone].number == 36)
    

    etc. etc.