SA-MP Forums Archive
Getting House ID - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Getting House ID (/showthread.php?tid=625373)



Getting House ID - mrcakke - 31.12.2016

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


Re: Getting House ID - SoLetsGO - 31.12.2016

What's the problem?


Re: Getting House ID - mrcakke - 31.12.2016

sometimes get's correct id sometimes not :V


Re: Getting House ID - Konstantinos - 31.12.2016

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.


Re: Getting House ID - mrcakke - 01.01.2017

Thank you.