error 035: argument type mismatch (argument 1) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: error 035: argument type mismatch (argument 1) (
/showthread.php?tid=444963)
error 035: argument type mismatch (argument 1) -
tboysamp - 19.06.2013
PHP код:
(100862) : error 035: argument 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;
}
}
}
}
}
}
Re: error 035: argument type mismatch (argument 1) -
Necip - 19.06.2013
Which line has the error?
Re: error 035: argument type mismatch (argument 1) -
tboysamp - 19.06.2013
Quote:
Originally Posted by Necip
Which line has the error?
|
new victim = random(Players);//100862
Re: error 035: argument type mismatch (argument 1) -
MP2 - 19.06.2013
Show the declaration of 'Players'. Sounds like an iteration array? In which case, use Iter_Random().