[Ajuda] warning 219: local variable "playerid" shadows a variable at a preceding level
#1

Linha:
PHP код:
for (new playeridplayerid MAX_PLAYERSplayerid++) 
Cуdigo completo:

PHP код:
forward Bank_IntrestTimer(playerid);
public 
Bank_IntrestTimer(playerid)
{
    
// Setup local variables
    
new IntrestAmountMsg[128];
    
// Increase the variable by one
    
CurrentIntrestTime++;
    
// And save it to the file
    
IntrestTime_Save();
    
// Process intrest for all online player with a bank account if intrest is enabled
    
if (IntrestEnabled == true)
    {
        
// Loop through all players
        
for (new playeridplayerid MAX_PLAYERSplayerid++)
        {
            
// Check if this player is logged in
            
if (APlayerData[playerid][LoggedIn] == true)
            {
                if (
APlayerData[playerid][PlayerLevel] >= 1)
                {
                
// Check if this player has a bank account (just check if there is money in the bank, it's useless to process the intrest for
                // a bank account which doesn't have any money in it, and having BankMoney also means the player has a bank account)
                
if (APlayerData[playerid][BankMoney] > 0)
                {
                    
// Calculate the intrest
                    
IntrestAmount floatround(floatmul(APlayerData[playerid][BankMoney], BankIntrest), floatround_floor);
                    
// Add intrest to this player's bank account
                    
APlayerData[playerid][BankMoney] = APlayerData[playerid][BankMoney] + IntrestAmount;
                    
// Save the CurrentIntrestTime for this bank account
                    
APlayerData[playerid][LastIntrestTime] = CurrentIntrestTime;
                    
// Save the player's bank account
                    
BankFile_Save(playerid);
                    
// Inform the player that he received intrest on his bank account and how much
                    
format(Msg128"Os juros chegaram! ^^"IntrestAmount);
                    
SendClientMessage(playerid0xFFFFFFFFMsg);
                    }
                }
            }
        }
    }

O que pode ser?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)