PDA

View Full Version : Dumb Question Time


mByte
01-03-2003, 09:48 PM
Ok forsome reason I forgot how to do this in C

I want to convert struct* to const char* how?

ie

bool SaveSpawn(spawn_struct* sStruct){

const char* SN = sStruct->name;

RunQuery(query, MakeAnyLenString(&query, "INSERT INTO npc_types (name) values('%s')", SN);

}

Error is
'cannot convert parameter 1 from 'const char *' to 'Spawn_Struct *'

I did this before in the last release but pc crashed few weeks ago, before i could get anything documented.

its very late so im going to hit the sack maybe it will come back to me.

mByte
01-03-2003, 09:55 PM
Figured it out hit me as I was closing, I was passing the const char* when i needed to pass it as a char[64]

disreguard this.