error 035: argument type mismatch (argument 1)
#1

PHP код:
(100862) : error 035argument type mismatch (argument 1
Код:
public MAINTENANCE_T1()                           // GLOBAL MAINTENANCE TIMER 1
{
    if(RandomFireMissionCount == 0)
	{
// FD MISSIONS
        new count = 0;
        for(new i=0; i<APPROX_PLAYERS; i++) {
            if(PlayerInfo[i][pMember] == 4){
                count++;
            }
        }
        if(count >= 1) {

            new victim = random(Players);//100862
            new playername[MAX_PLAYER_NAME];
            GetPlayerName(victim, playername, sizeof(playername));
            new CURRENT_POINTS[256];
            new NAME_POINTS[128];
            format(NAME_POINTS, sizeof(NAME_POINTS), "(EXP) %s", playername);
            CURRENT_POINTS = dini_Get("/ERPSS/EXP.txt",NAME_POINTS);
            new PossibleVictim[APPROX_PLAYERS];
            PossibleVictim[victim] = strval(dini_Get("/ERP05/ElectricityCost.txt", playername));

            if(PossibleVictim[victim] == 0) {

                //if(PlayerInfo[pMember] == 4){
                if(Diseased[victim]==0) {
                    if(strval(CURRENT_POINTS) > 2) {
                                                  // 10 seconds
                        SetTimerEx("CrackVictim", 10000, 0, "i", victim);
                        SendClientMessage(victim, COLOR_BRIGHTRED, "");
                        SendClientMessage(victim, COLOR_BRIGHTRED, "You start to feel dizzy.");
                        SetPlayerDrunkLevel(victim, 50000);
                        Diseased[victim]=1;
                        RandomFireMissionCount = 1;
                    }
                }
            }
		}
	}
}
Reply
#2

Which line has the error?
Reply
#3

Quote:
Originally Posted by Necip
Посмотреть сообщение
Which line has the error?
new victim = random(Players);//100862
Reply
#4

Show the declaration of 'Players'. Sounds like an iteration array? In which case, use Iter_Random().
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)