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
>

Reply via email to