error 017: undefined symbol "playerid"..
#1

Give me this error here.. :

Код:
public payday()
{
    for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
    {
        GameTextForPlayer(i, "PAYDAY + 10 0000$ and + 10 score", 1000, 1);
        SetPlayerScore(playerid,GetPlayerScore(playerid)+10);
        GivePlayerMoney(i, 10000); // You can change the ammount of money.
    }
    return 1;
}
Reply
#2

public payday()
{
for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
{
GameTextForPlayer(i, "PAYDAY + 10 0000$ and + 10 score", 1000, 1);
SetPlayerScore(i,GetPlayerScore(playerid)+10);
GivePlayerMoney(i, 10000); // You can change the ammount of money.
}
return 1;
}

Try that or just define new playerid; if you want i don't know what you' making
Reply
#3

It's because playerid isn't set anywhere within the function. Change it to 'i' instead, like osman2571 showed by the "SetPlayerScore".
Reply
#4

Quote:
Originally Posted by osman2571
Посмотреть сообщение
on other way she can just put forward payday(playerid) and also make public payday(playerid)
Basically that is a bad idea, The SetTimer is meant to be called without the parameters, What do you think?
Reply
#5

Quote:
Originally Posted by osman2571
Посмотреть сообщение
on other way she can just put forward payday(playerid) and also make public payday(playerid)
Well since he's using a for loop inside of the paycheck function; there's no reason to send a playerid.
Reply
#6

pawn Код:
public payday()
{
    for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
    {
        GameTextForPlayer(i, "PAYDAY + 10 0000$ and + 10 score", 1000, 1);
        SetPlayerScore(playerid,GetPlayerScore(i)+10);
        GivePlayerMoney(i, 10000); // You can change the ammount of money.
    }
    return 1;
}
Reply
#7

pawn Код:
public payday()
{
    for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
    {
        GameTextForPlayer(i, "PAYDAY + 10 0000$ and + 10 score", 1000, 1);
        SetPlayerScore(i,GetPlayerScore(i)+10);
        GivePlayerMoney(i, 10000); // You can change the ammount of money.
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)