trouble compiling logon history snippet from Xerves 2004-12-12 - By Conner Destron
Back Guess I really need to learn to code better... ok, for Eos and the others here who are clearly better at this than I am, here's my latest snafu...
I'm trying to add the login history snippet by Xerves and when I compile the output reads:
save.c: In function 'do_last': save.c:2186: too many arguments to function 'read_last_file' save.c:2188: too many arguments to function 'read_last_file' save.c:2195: too many arguments to function 'read_last_file' make[1]: *** [o/save.o] Error 1 make: *** [all] Error 2
So, naturally I take a look at save.c on those three lines to see what it's talking about:
save.c: 2186 reads: read_last_file(ch, -2, NULL); save.c: 2188 reads: read_last_file(ch, atoi(arg), NULL); save.c: 2195 reads: read_last_file(ch, atoi(argument), name);
Now, with my very limited programming expertise, I naturally say to myself "looks about right to me, but let's see what that function is defined as" and I discover that it's defined in mud.h on line 4880 which reads:
void read_last_file args((CHAR_DATA *ch, int count));
Now, I'm looking at this going, hmm, does this mean there should only be two things in the paranthesis? And, more to the point, what do I need to do to fix it?
As always, thanks in advance to whoever can help me on this one, -=Conner=-
-- Visit The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org for some family fun in a medieval setting, or come test your mettle in the Land of Legends, our MUD, at telnet://tcdbbs.zapto.org:4000 For general info, visit http://www.tcdbbs.zapto.org <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1"> <META content="MSHTML 6.00.2900.2523" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face="Comic Sans MS" color=#000080 size=2>Guess I really need to learn to code better... ok, for Eos and the others here who are clearly better at this than I am, here's my latest snafu...</FONT></DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2></FONT> </DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2>I'm trying to add the login history snippet by Xerves and when I compile the output reads:</FONT></DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2></FONT> </DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2>save.c: In function 'do_last':</FONT></DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2>save.c:2186: too many arguments to function 'read_last_file'</FONT></DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2>save.c:2188: too many arguments to function 'read_last_file'</FONT></DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2>save.c:2195: too many arguments to function 'read_last_file'</FONT></DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2>make[1]: *** [o/save.o] Error 1</FONT></DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2>make: *** [all] Error 2</FONT></DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2></FONT> </DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2>So, naturally I take a look at save.c on those three lines to see what it's talking about:</FONT></DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2></FONT> </DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2>save.c: 2186 reads: read_last_file(ch, -2, NULL);</FONT></DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2>save.c: 2188 reads: read_last_file(ch, atoi(arg), NULL);</FONT></DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2>save.c: 2195 reads: read_last_file(ch, atoi(argument), name);</FONT></DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2></FONT> </DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2>Now, with my very limited programming expertise, I naturally say to myself "looks about right to me, but let's see what that function is defined as" and I discover that it's defined in mud.h on line 4880 which reads:</FONT></DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2></FONT> </DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2>void read_last_file args((CHAR_DATA *ch, int count));</FONT></DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2></FONT> </DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2>Now, I'm looking at this going, hmm, does this mean there should only be two things in the paranthesis? And, more to the point, what do I need to do to fix it?</FONT></DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2></FONT> </DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2>As always, thanks in advance to whoever can help me on this one,</FONT></DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2> -=Conner=-</FONT></DIV> <DIV> </DIV> <DIV><FONT face="Comic Sans MS" color=#000080 size=2>--<BR>Visit The Castle's Dungeon BBS at <A href="telnet://tcdbbs.zapto.org">telnet://tcdbbs.zapto.org</A > for some family<BR>fun in a medieval setting, or come test your mettle in the Land of Legends, <BR>our MUD, at <A href="telnet://tcdbbs.zapto.org:4000">telnet://tcdbbs.zapto.org:4000</A><BR>For general info, visit <A href="http://www.tcdbbs.zapto.org">http://www.tcdbbs.zapto.org</A></FONT></DIV> </BODY></HTML>
|
|