Re: runters unlimited bits code
"Valnir" <[email protected]> Thu, 26 May 2005 17:15:10 -0400
| Newsgroups | gmane.games.devel.mud.rom |
|---|---|
| Message-ID | <[email protected]> |
I believe BITMASK is defined as a long in that code, so make sure you are referencing it as %ld anywhere you are referring to it, not %d. - Valnir ----- Original Message ----- From: "omar miisa" <[email protected]> To: <[email protected]> Sent: Thursday, May 26, 2005 4:26 PM Subject: runters unlimited bits code > Hey, i was just putting in runters unlimited bits code and i hit a snag i > was hoping you guys could help me out with. i was changing my IS_SET('s to > is_set(&'s and i get this warning that i dont know how to fix, heres > the chunk of code in do_wiznet: > > for (flag = 0; wiznet_table[flag].name != NULL; flag++) > if (is_set(&ch->wiznet,wiznet_table[flag].flag)) > { > strcat(buf,wiznet_table[flag].name); > strcat(buf," "); > } > > the warning is this: > 'sh_int' differs in levels of indirection from 'const BITMASK *' > > it worked fine for everything else though. > > one more quick question about free_mem, is this function: > > // Frees your bitmask. Safe to call dry. Returns 2 if > // it frees anything. 1 if it doesn't. > int free_bitmask(BITMASK *pBmask) { > BMlist *pBMlist, *next; > int found = 1; > for(pBMlist = pBmask->int_list;pBMlist;pBMlist = next) { > next = pBMlist->next; > free_mem(pBMlist); > found = 2; > } > return found; > } > > free_mem doesnt have all the parameters it requires for me(Rot) and i > dont quite understand what the second parameter is for... > > > heres the top of my free_mem, perhaps someone can point me in the right > direction? > > void free_mem( void *pMem, int sMem ) > { > int iList; > int *magic; > > (char *) pMem -= sizeof(*magic); > magic = (int *) pMem; > > > > anyway, thanks for your time and any help, > > _________________________________________________________________ > Don't just Search. Find! http://search.sympatico.msn.ca/default.aspx The > new MSN Search! Check it out! > > -- > ROM mailing list > [email protected] > Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom > -- ROM mailing list [email protected] Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom