Annoying error again -
GNGification - 23.03.2011
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!
Re: Annoying error again - Max_Coldheart - 23.03.2011
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?
Re: Annoying error again -
GNGification - 23.03.2011
without public (second one)
Re: Annoying error again -
xir - 23.03.2011
You will need to add that
Re: Annoying error again -
Gamer_Z - 23.03.2011
Код:
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.
Re: Annoying error again -
GNGification - 23.03.2011
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?
Re: Annoying error again -
Zh3r0 - 23.03.2011
....
Re: Annoying error again -
GNGification - 23.03.2011
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());
Re: Annoying error again -
Gamer_Z - 23.03.2011
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...