Annoying error again
#1

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!
Reply
#2

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?
Reply
#3

without public (second one)
Reply
#4

You will need to add that
Reply
#5

Код:
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:
pawn Код:
new randomplayer = 255;
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.
Reply
#6

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?
Reply
#7

pawn Код:
new infectplayer;
....
Reply
#8

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());
Reply
#9

Quote:
Originally Posted by Zh3r0
Посмотреть сообщение
pawn Код:
new infectplayer;
....
don't post junk to newbies...

but ye everyone should know what should be a function and what a variable...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)