Thread: Dilema...
View Single Post
  #11  
Old 02-07-2002, 02:35 PM
GregoryYoshi GregoryYoshi is offline
Registered User
Join Date: Jan 2002
Location: Wherever I am right now
Posts: 227
GregoryYoshi is on a distinguished road
Send a message via AIM to GregoryYoshi Send a message via Yahoo to GregoryYoshi
Quote:
Originally posted by Kaimetsu


Wait a second... That loop looks mighty strange.

NPC Code:
function gethitter() {
hitter = -1;
for (i=0; i<playerscount; i++)
if (players[i].id==this.hitterid) {
hitter = i;
break;
}
}



Look at the brackets. If I were you, I'd try it like this:

NPC Code:
function gethitter() {
hitter = -1;
for (i=0; i<playerscount; i++){
if (players[i].id==this.hitterid) {
hitter = i;
break;
}
}
}

Sometimes I hate myself Figures I'd miss a bracket
__________________
Zayjee uses this account now. OK?
Reply With Quote