Code not working.
#6

Quote:
Originally Posted by Ritzy
Посмотреть сообщение
Isn't that loop looping and updating the turf's value and then returning it for further use?
PHP код:
stock OwnedTurfs2(teamid//calling the function with a team id
{
    new 
turf//new variable 'turf' which has a value of 0
    
for (new 0MAX_TURFSi++) //looping from 0 to max turfs number
    
{
        if(
turfs[i][TurfOwner] == teamid//if the loop found that turf owner = teamid (i really don't know how would an owner name will equal a number)
        
{
            
TeamInfo[teamid][ TeamTurfs ] = // reseting team turfs to 0
            
TeamInfo[teamid][ TeamTurfs ]++; // add +1 to team turfs after resetting it to 0 (which make no sense)
        
}
    }
    return 
turf//return 0 which is variable 'turf' as u havent change the value of it

Reply


Messages In This Thread
Code not working. - by Ritzy2K - 18.11.2017, 04:16
Re: Code not working. - by Sithis - 18.11.2017, 06:25
Re: Code not working. - by Ritzy2K - 18.11.2017, 06:40
Re: Code not working. - by Juvanii - 18.11.2017, 08:54
Re: Code not working. - by Ritzy2K - 18.11.2017, 08:59
Re: Code not working. - by Juvanii - 18.11.2017, 09:23
Re: Code not working. - by Ritzy2K - 18.11.2017, 10:03
Re: Code not working. - by Ritzy2K - 18.11.2017, 10:15
Re: Code not working. - by Juvanii - 18.11.2017, 10:36
Re: Code not working. - by Ritzy2K - 18.11.2017, 10:46

Forum Jump:


Users browsing this thread: 1 Guest(s)