char * do_fun_str( void * temp )
{
        DO_FUN ** fun = (DO_FUN **) temp;
+     printf("%s\n", cmd_func_name( *fun ));
        return cmd_func_name( *fun );
}

I'd like to see what cmd_func_name() returns;



>-----Original Message-----
>From: Tom Whiting [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, June 12, 2002 5:12 PM
>To: 'Jason Gauthier'; [email protected]
>Subject: RE: hmm
>
>
>char * do_fun_str( void * temp )
>{
>       DO_FUN ** fun = (DO_FUN **) temp;
>
>       return cmd_func_name( *fun );
>}
>There's what do_fun_str returns.. 
>After changing it to a char * arg,  it compiles without warnings, but
>doesn't return what it should. Here's the query it sends.
>executing: INSERT into commands 'at','','0',211,',0','A','0',0,'A'
>                                                **do_at should be right
>here.
>
>+----------------------------------------------------+
>+   TJW: Head Tech, designer: Dreamless Realms Mud   +
>+   Mud : http://drealms.kyndig.com                         +
>+   Telnet: drealms.kyndig.com port 9275                    +
>+   OLC Docs: http://olc.kyndig.com                       +
>+----------------------------------------------------+
>
>
>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason
>Gauthier
>Sent: Wednesday, June 12, 2002 3:27 PM
>To: '[EMAIL PROTECTED]'; [email protected]
>Subject: RE: hmm
>
>
>Tom-
>
>DO_FUN isn't an actual character string.
>
>Shouldn't fun string be 'char *fun_string;' ?
>
>I can't tell because I don't know what do_fun_str() returns.
>
>But, that would be my first guess from looking at this.
>
>>-----Original Message-----
>>From: Tom Whiting [mailto:[EMAIL PROTECTED]
>>Sent: Wednesday, June 12, 2002 4:20 PM
>>To: [email protected]
>>Subject: hmm
>>
>>
>>Ok, quick question (and this may sound stupid, my apologies if 
>>it does).
>>Right now, I'm working on getting everything moved from file 
>>data to sql
>>data, beginning with the olc data, moving from there to the player
>>files, etc.
>>In olc2, the command table is taken from interpret and saved to a
>>separate file for cmdedit. Unfortunately, when trying to 
>>convert that to
>>sql, I get an incompatible pointer type (something I have little
>>experience dealing with).
>>Here's the save command as it is now
>>void sql_add_command(int command)
>>{
>>char sql[3*MSL];
>>int i=0;
>>DO_FUN ** fun_string;
>>
>>if(cmd_table[i].name)
>>{
>>fun_string=str_dup(do_fun_str(cmd_table[i].do_fun));
>>sprintf(sql,"INSERT into commands
>>'%s','%s','%s',%d,',%s','%s','%d',%d,'%s'",
>>cmd_table[i].name,
>>fun_string,
>>cmd_table[i].position? print_flags(cmd_table[i].position) : "0",
>>cmd_table[i].level,
>>cmd_table[i].log? print_flags(cmd_table[i].log) :"0",
>>cmd_table[i].show? print_flags(cmd_table[i].show) :"0",
>>cmd_table[i].corner_cmd,
>>cmd_table[i].valid_cmd,
>>cmd_table[i].secgroup ? print_flags(cmd_table[i].secgroup):"0");
>>}
>>send_update(sql);
>>return;
>>}
>>
>>As fun_string is a DO_FUN argument, is there another pointer I 
>>SHOULD be
>>using to save this? Can someone kindly show me where I might 
>be able to
>>find a little bit more info about pointers and the like? I'm really
>>clueless here, and I have a feeling it'll be quite helpful in the
>>future.
>>
>>Thankies
>>
>>+----------------------------------------------------+
>>+   TJW: Head Tech, designer: Dreamless Realms Mud   +
>>+   Mud : http://drealms.kyndig.com                        +
>>+   Telnet: drealms.kyndig.com port 9275                   +
>>+   OLC Docs: http://olc.kyndig.com                      +
>>+----------------------------------------------------+
>>
>>
>>
>>
>>
>>-- 
>>ROM mailing list
>>[email protected]
>>http://www.rom.org/cgi-bin/mailman/listinfo/rom
>>
>
>-- 
>ROM mailing list
>[email protected]
>http://www.rom.org/cgi-bin/mailman/listinfo/rom
>
>
>
>

Reply via email to