Posts: 169
Threads: 25
Joined: Nov 2010
Reputation:
0
Okey error is this: C:\Users\Vanhempien Kone\Videos\Desktop\Kaikki\WoS_SAMP\Servu\gamemode s\Stand.pwn(895) : error 004: function "infectplayer" is not implemented
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Line 894: SetTimer("EndRound", 12000, 0);
Line 895: infectplayer(randomplayer);
Line 896:AddStaticVehicleEx(548,-1955.42480469,282.80142212,49.60318756,0.00000000,-1,-1,500); //Cargobob
I have forwarded it with code: forward infectplayer(randomplayer);
+ here is the random player thing
randomplayer()
{
new randomid = random(GetPlayersOnServer());
if(!IsPlayerConnected(randomid)){ return randomplayer(); }
return randomid;
}
Thanks for helping!
Max_Coldheart
Unregistered
you have it like this:
pawn Код:
forward randomplayer();
public randomplayer()
{
new randomid = random(GetPlayersOnServer());
if(!IsPlayerConnected(randomid)){ return randomplayer(); }
return randomid;
}
or like
pawn Код:
randomplayer()
{
new randomid = random(GetPlayersOnServer());
if(!IsPlayerConnected(randomid)){ return randomplayer(); }
return randomid;
}
what way did you create it?
Posts: 169
Threads: 25
Joined: Nov 2010
Reputation:
0
without public (second one)
Posts: 746
Threads: 81
Joined: Aug 2010
Reputation:
0
You will need to add that
Posts: 1,047
Threads: 23
Joined: Jun 2009
Код:
error 004: function "x" is not implemented
means:
there is no
pawn Код:
stock x(..)
//or
public x(..)
//or
x(..)
and
pawn Код:
infectplayer(randomplayer);
has to be corrected to:
pawn Код:
infectplayer(randomplayer());
but if you want to use
pawn Код:
infectplayer(randomplayer);
then 'randomplayer' needs to be an interger variable
like:
But if you have a function called 'randomplayer();' and a variable 'randomplayer;' then it will cause more errors.
and:
Quote:
Originally Posted by Max_Coldheart
you have it like this:
pawn Код:
forward randomplayer(); public randomplayer() { new randomid = random(GetPlayersOnServer()); if(!IsPlayerConnected(randomid)){ return randomplayer(); } return randomid; }
or like
pawn Код:
randomplayer() { new randomid = random(GetPlayersOnServer()); if(!IsPlayerConnected(randomid)){ return randomplayer(); } return randomid; }
what way did you create it?
|
using public is nothing wrong...
But yes function is better but let him choose, it doesn't make any warnings or errors.
Posts: 169
Threads: 25
Joined: Nov 2010
Reputation:
0
Almost done, now one thing.
error 017: undefined symbol "infectplayer"
infectplayer means that when someone gets infected he's team will be setted 1
SetPlayerTeam(playerid, 1);
so anyone wanna post a example of it?
Posts: 169
Threads: 25
Joined: Nov 2010
Reputation:
0
yeah I tried that too but then comes up errors:
C:\Users\Vanhempien Kone\Videos\Desktop\Kaikki\WoS_SAMP\Servu\gamemode s\Stand.pwn(905) : error 012: invalid function call, not a valid address
C:\Users\Vanhempien Kone\Videos\Desktop\Kaikki\WoS_SAMP\Servu\gamemode s\Stand.pwn(905) : error 001: expected token: ";", but found ")"
C:\Users\Vanhempien Kone\Videos\Desktop\Kaikki\WoS_SAMP\Servu\gamemode s\Stand.pwn(905) : error 029: invalid expression, assumed zero
C:\Users\Vanhempien Kone\Videos\Desktop\Kaikki\WoS_SAMP\Servu\gamemode s\Stand.pwn(905) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
btw, error line is: infectplayer(randomplayer());
Posts: 1,047
Threads: 23
Joined: Jun 2009
Quote:
Originally Posted by Zh3r0
|
don't post junk to newbies...
but ye everyone should know what should be a function and what a variable...