Getting House ID
#1

I have problem with house system i don't know what i'm doing wrong i have two possibilities to check house id and i don't know what is problem with that
Ways to check:http://pastebin.com/VNxWerE0
Reply
#2

What's the problem?
Reply
#3

sometimes get's correct id sometimes not :V
Reply
#4

The problem is that you return 1 at the end of the function which is still a valid house index. Change it to -1 or some other invalid value but always check if the value is valid before using it in arrays.
Reply
#5

Thank you.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)