give me a couple hours to figure that one out…I am sorta new at the whole coding thing….I know enough to boot, make changes here and there, etc. But dunno what you mean by definition of the table…so..this may take a bit.
Error is here, bottom follows what is in those files.
gcc -c -Wall -O -g -DNOCRYPT act_comm.c In file included from act_comm.c:14: tables.h:2: error: array type has incomplete element type tables.h:3: error: array type has incomplete element type tables.h:4: error: array type has incomplete element type tables.h:7: error: array type has incomplete element type tables.h:8: error: array type has incomplete element type tables.h:9: error: array type has incomplete element type tables.h:10: error: array type has incomplete element type tables.h:11: error: array type has incomplete element type tables.h:12: error: array type has incomplete element type tables.h:13: error: array type has incomplete element type tables.h:14: error: array type has incomplete element type tables.h:15: error: array type has incomplete element type tables.h:16: error: array type has incomplete element type tables.h:17: error: array type has incomplete element type tables.h:18: error: array type has incomplete element type tables.h:19: error: array type has incomplete element type tables.h:20: error: array type has incomplete element type tables.h:21: error: array type has incomplete element type tables.h:22: error: array type has incomplete element type tables.h:23: error: array type has incomplete element type tables.h:24: error: array type has incomplete element type tables.h:25: error: array type has incomplete element type tables.h:26: error: array type has incomplete element type tables.h:27: error: array type has incomplete element type tables.h:28: error: array type has incomplete element type tables.h:29: error: array type has incomplete element type tables.h:30: error: array type has incomplete element type tables.h:31: error: array type has incomplete element type tables.h:32: error: array type has incomplete element type tables.h:33: error: array type has incomplete element type tables.h:34: error: array type has incomplete element type tables.h:35: error: array type has incomplete element type tables.h:36: error: array type has incomplete element type tables.h:37: error: array type has incomplete element type tables.h:38: error: array type has incomplete element type tables.h:39: error: array type has incomplete element type tables.h:40: error: array type has incomplete element type tables.h:41: error: array type has incomplete element type tables.h:42: error: array type has incomplete element type tables.h:43: error: array type has incomplete element type make: *** [act_comm.o] Error 1
Go me, I solved that issue all on my own. and a few others, and someone else is helping me also. but now this has us both stumped.
act_info.c: In function 'show_inventory_to_char': act_info.c:363: error: incompatible type for argument 1 of 'flag_string' make: *** [act_info.o] Error 1
sprintf(itemtype, "%s", flag_string(weapon_class,obj->value[0])); else if (obj->item_type == ITEM_ARMOR) sprintf(itemtype, "Armor"); else if (obj->item_type == ITEM_QUEST) sprintf(itemtype, "Quest");
that is line 363 and a bit beyond…any help would be appreciated
What it is saying is that weapon_class is not of the type the flag_string function expects. It would help to compare the definitions of weapon_class and how flag_string() is declared (or defined). As I recall, weapon_class would be a name of an array of const char* and it might be just a const/nonconst issue. One other thing, check to make sure flag_string() is being used right, I don't know about your code here, but in the SMAUG derived code I work in, the bitvector is the 1st argument and the string array the 2nd (the reverse of how your code seems to be doing it).
14 Apr, 2009, David Haley wrote in the 28th comment:
Votes: 0
I hadn't even noticed that the names were inverted in the extern declaration and the table definition. A hint at what the problem was is indeed that different structure names were being used. It's kind of interesting that this error has been in there all these years – cheers for better compilers I suppose. :wink:
grep "text to search for" *.c *.h will search for "text to search for" in all .c and .h files.
David, how does that differ from: grep "text to search for" *.[ch]
Although I could see using the *.are *.bak if it's a multi-character file extension.
15 Apr, 2009, David Haley wrote in the 30th comment:
Votes: 0
It doesn't. *.[ch] means anything followed by a dot followed by c or h. This is pretty clearly the same as anything ending in .c and anything ending in .h.
Small update: Upon gaining a third free shell provider, I tried changing the compiler in my makefile to gcc-3.4 and the game compiled cleanly! It doesn't seem to work in my other two shells, but the third one works like a charm, so I am reaaal happy. I would like to thank all the people who helped me here!
It doesn't. *.[ch] means anything followed by a dot followed by c or h. This is pretty clearly the same as anything ending in .c and anything ending in .h.
Ah cool, my grep-fu isn't as good as it could be (grep patterns etc) but I figured I'd ask. The .(string) way seems nice also, especially in longer file extensions like .3 etc.
15 Apr, 2009, David Haley wrote in the 33rd comment:
Votes: 0
Well, I'll make a stronger statement: it's actually very impractical to deal with multi-character extensions using single-letter character classes. :wink:
I think it's actually kind of interesting that you prefer the character class notation, as personally I find that that requires more understanding of what's going on, as opposed to a sequence of simple patterns.
Well, I'll make a stronger statement: it's actually very impractical to deal with multi-character extensions using single-letter character classes. :wink:
I think it's actually kind of interesting that you prefer the character class notation, as personally I find that that requires more understanding of what's going on, as opposed to a sequence of simple patterns.
I hear you, I use that exclusively in my source, not when dealing with the multi-character extensions. So it's always .c or .h files, kind of made it the shortest route to type for me. But, I was also first tutored by a C programmer who did MUD programming for his fun stuff and wrote embedded code for military chips for his regular stuff. He had me start with 'A book on C' and continually would chide me to do things the a certain way heh. That style of grep was how he'd originally showed me way back. But I do often use that (although usually with more like [a-z] -i etc heh) in my grep patterns.
Ah cool, my grep-fu isn't as good as it could be (grep patterns etc) but I figured I'd ask. The .(string) way seems nice also, especially in longer file extensions like .3 etc.
Minor nit: has nothing to do with grep, as the *.[ch] stuff is all part of the shell globbing. Totally different kind of pattern than what grep itself is using, which are POSIX regular expressions. :)