Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!mips!apple!tahoe!tamela From: tamela@tahoe.unr.edu (Tamela R. Germano) Newsgroups: comp.sources.games.bugs Subject: Re: new Castle error Keywords: 4.3 bsd "word[]" Message-ID: <3637@tahoe.unr.edu> Date: 1 Mar 90 20:38:29 GMT References: <2616@leah.Albany.Edu> Reply-To: tamela@tahoe.unr.edu (Tamela R. Germano) Organization: University of Nevada Reno Lines: 31 In article <2616@leah.Albany.Edu> h44394@leah.Albany.Edu (Michael R. Hoffman) writes: >does weekly deletions, it was wiped before I read it. The problem is in >"store.c" at line 227: > char word[]; >The error ihas to do with "null space declaration". > >It seems that with 4.3BSD UNIX running non-ANSI C, this declaration must either >contain an initialization value (i.e.- char word[]="*******") or a size value >(i.e.- char word[*]). > >I tried using "char word[6]" after looking at the code, but now it won't accept >the passwords for the stores. I just keep getting "too bad." In store.c there is a function ask_ques(q), it's string compares are messed up. Replace: if((strcmp(word,"death")) == 10){ with: if (!strcmp(string,"death\n")){ Do similarly for the other two questions. Also, I replaced char word[] with char *word instead of giving it a size. ___ _ / / // --/ __ ______ _ // __ (_/ (_/|_/ / / <_