Foreach bug?
#1

i have this code
Код:
    foreach(House, h) {
        foreach(Player, playerid) {
            if(IsPlayerInRangeOfPoint(playerid, 3.0, HouseInfo[h][hExitX], HouseInfo[h][hExitY], HouseInfo[h][hExitZ])) {
// displaying text here
But when 2 players are standing in the position it's not showing the text for 2nd player but its showing for 1st player, anyone?
Reply
#2

could be a break; at the end of your if{} (if it works in foreach, but i think so) If there is one, remove it.
Reply
#3

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
could be a break; at the end of your if{} (if it works in foreach, but i think so) If there is one, remove it.
Thanks!!! I didn't notice the return 1;!
Reply
#4

hmm when i removed return 1; it doesnt show anything anymore..
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)