Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!oliveb!bunker!elliott From: elliott@bunker.UUCP (Elliott Kleinrock) Newsgroups: comp.sources.games.bugs Subject: Compiler error in Galatic Bloodshed Message-ID: <4968@bunker.UUCP> Date: 28 Apr 89 18:31:06 GMT References: <3887@tekred.CNA.TEK.COM> <1784@deimos.cis.ksu.edu> Reply-To: elliott@clunker.UUCP (Elliott Kleinrock) Organization: Bunker Ramo, an Olivetti Company, Shelton, Ct Lines: 40 While making GB I got: cc -DVER_4.3 -pipe -g -c makeplanet.c "makeplanet.c", line 289: compiler error: expression causes compiler loop: try simplifying *** Exit 1 Stop. this is line 289: s->fert = (float)(landsectors + 5) / (float)Numlandsects * 100; here is the function it came from: int Volcano(pptr,landsectors,Numlandsects) planettype *pptr; int landsectors,Numlandsects; { int x,y; sectortype *s; (void)Getxysect(pptr,&x,&y,0); /*x = int_rand(0,pptr->Maxx-1); y = int_rand(0,pptr->Maxy-1);*/ s = &Sector(*pptr,x,y); if (s->des==DES_SEA) { if (Numneighbors(pptr,x,y,DES_LAND)||Numneighbors(pptr,x,y,DES_MOUNT)) { s->des=(landsectors>(MAP_MOUNT_PERCENT*Numlandsects))?DES_LAND:DES_MOUNT; s->resource = round_rand((float)(Numlandsects - landsectors + 5) / (float)Numlandsects * 100); /* min content prop to dist from sea */ s->fert = (float)(landsectors + 5) / (float)Numlandsects * 100; /* fert content prop to dist from center of continent */ return(1); } else return(0); } else return(0); } could someone tell me how to fix this - Elliott