30 Jun, 2009, Terraco wrote in the 1st comment:
Votes: 0
code base is ROM2.4 B6/Quickmud

gcc -O -g3 -Wall -DIMC -DIMCROM -c -o obj/olc_mpcode.o olc_mpcode.c
gcc -O -g3 -Wall -DIMC -DIMCROM -c -o obj/olc_save.o olc_save.c
olc_save.c:467: error: expected identifier or '(' before '{' token
make: *** [obj/olc_save.o] Error 1

449: void save_objects (FILE * fp, AREA_DATA * pArea)
450: {
451: int i;
452: OBJ_INDEX_DATA *pObj;
454: fprintf (fp, "#OBJECTS\n");
456: for (i = pArea->min_vnum; i <= pArea->max_vnum; i++)
457: {
458: if ((pObj = get_obj_index (i)))
459: save_object (fp, pObj);
460: }
462: fprintf (fp, "#0\n\n\n\n");
463: return;
464: }
467: {
469: fprintf( fp, "%d %d %d %d %d\n",
470: pObjIndex->value[0],
471: pObjIndex->value[1],
472: pObjIndex->value[2],
473: pObjIndex->value[3],
474: pObjIndex->value[4]);
475: break;
476: }
30 Jun, 2009, Kayle wrote in the 2nd comment:
Votes: 0
Uh.. Which line is 467?
30 Jun, 2009, Terraco wrote in the 3rd comment:
Votes: 0
I added the line numbers. just after I realized they weren't there lol it cant be that difficult but I have used the brackets and anything else I can think of or my outdated book says.
30 Jun, 2009, Kayle wrote in the 4th comment:
Votes: 0
Totally unrelated, but why on line 458 is it encased in two sets of parenthesis? if( pObj = get_obj_index( i ) ) should work fine, you shouldn't need a second set.

As for the error, you can't really just drop that case statement anywhere in the file. It's not really associated with anything and that's what it's telling you. You need an identifier before the {. Meaning that needs to be inside another function. Although with a case statement, not only does it need to be inside a function, but also inside some kind of switch statement I would assume.
30 Jun, 2009, Terraco wrote in the 5th comment:
Votes: 0
void deduct_bet (CHAR_DATA * ch, int bet)

expected ')' before '*' token

They all look like that though so what the error?
30 Jun, 2009, Sandi wrote in the 6th comment:
Votes: 0
When you mess up parens or brackets the compiler gets very confused, and the line numbers it references are often meaningless.

The second error you posted is telling you that a ')' is missing somewhere in the previous function.

In the first code you posted, you have a case from a switch() in the function save_object() just floating by itself.

Kayle, I suspect once upon a time, that function read: if ((pObj = get_obj_index (i)) != NULL)
30 Jun, 2009, flumpy wrote in the 7th comment:
Votes: 0
Terraco said:
void deduct_bet (CHAR_DATA * ch, int bet)

expected ')' before '*' token

They all look like that though so what the error?

Kayles right, you just look like you've dropped part of a switch statement in the middle of a file. You need a switch statement around that, AND a function around the switch. In fact it really just looks like out of context garbage at the moment…

What are you trying to achieve?
30 Jun, 2009, Skol wrote in the 8th comment:
Votes: 0
It looks like it was meant to go in 'save_object()' not save_objects(), and it's part of a switch statement that was just dropped in by itself in the wrong place. Is that my slots snippet? Nikolai had one I redid a number of years back.