if (obj != NULL && obj->pIndexData->vnum != ch->questbox)be
if (obj->pIndexData->vnum == ch->questbox)to say that if the objects vnum does equal the questbox number then the object was found. (you can also get rid of the first part of the if check making sure the object isn't null since the for loop would end if the object was null anyways and therefore not even get to that check.)
else if (ch->questbox < 1 && ch->countdown > 0)
{
bool obj_found = FALSE;
for (obj = ch->carrying; obj != NULL; obj= obj_next)
{
obj_next = obj->next_content;
if (obj->pIndexData->vnum == ch->questbox)
{
obj_found = TRUE;
break;
}
}
if (obj_found == FALSE)
{
/*Point rewarding stuff*/
but anyways, here it is
else if (ch->questbox < 1 && ch->countdown > 0)
{
bool obj_found = FALSE;
for (obj = ch->carrying; obj != NULL; obj= obj_next)
{
obj_next = obj->next_content;
if (obj != NULL && obj->pIndexData->vnum != ch->questbox)
{
obj_found = TRUE;
break;
}
}
The only problem I seem to be having is not completing the quest. I am pretty sure the error is in this. Fixed everything else but can't seem to get it to recognize that the item to be deliverd isnt being carried anymore. I ahave messed with about everything in here to get it to work but can't