Druckles
Party Escort Bot
- Joined
- Dec 13, 2004
- Messages
- 10,652
- Reaction score
- 26
Just a quick note. If you flip your surrounding if statement, you can tuck the 'return FALSE' away at the top and leave everything outside the nasty braces.
Your internal if statement is almost there. I think what 'count' is is the number of elements in the array. If this is the case, you're accessing the item just after the last, which shouldn't exist. You need to access the 'i'th value and compare it to value. That would make more sense.
Also watch out for your for loop. The second part doesn't look right. It's saying 'i is from 0 to set->arrValue[count]' (again, arrValue[count] shouldn't exist). I believe what you're trying to say is 'i is from 0 to the last item's index'.
As a side note, surely 'count' should be a member of the structure Set?
I hope that gives you some clue.
Your internal if statement is almost there. I think what 'count' is is the number of elements in the array. If this is the case, you're accessing the item just after the last, which shouldn't exist. You need to access the 'i'th value and compare it to value. That would make more sense.
Also watch out for your for loop. The second part doesn't look right. It's saying 'i is from 0 to set->arrValue[count]' (again, arrValue[count] shouldn't exist). I believe what you're trying to say is 'i is from 0 to the last item's index'.
As a side note, surely 'count' should be a member of the structure Set?
I hope that gives you some clue.