Errors? -
jameskmonger - 13.01.2010
I've got these errors:
Код:
C:\Users\James\Desktop\RWRP\gamemodes\crp.pwn(16896) : error 001: expected token: ")", but found "{"
C:\Users\James\Desktop\RWRP\gamemodes\crp.pwn(16900) : error 017: undefined symbol "MsgSend"]
C:\Users\James\Desktop\RWRP\gamemodes\crp.pwn(16900) : error 001: expected token: ";", but found "]"
C:\Users\James\Desktop\RWRP\gamemodes\crp.pwn(16900) : error 029: invalid expression, assumed zero
C:\Users\James\Desktop\RWRP\gamemodes\crp.pwn(16900) : fatal error 107: too many error messages on one line
And here is my code:
Код:
forward AreaCheck();
public AreaCheck()
{
new MsgSent[MAX_PLAYERS] = 0;
for(new i=0; i<MAX_PLAYERS;i++)
{
if(IsPlayerInRangeOfPoint(i,300.0,232.5435,-146.6228,1.4297,183.3526)
{
if(MsgSent[i] == 0)
{
GameTextForPlayer(i,"3",1000,3);
MsgSend[i] = 1;
SetTimerEx("MsgUnsent",60000,0,"d",i);
SetTimerEx("Number2",1000,0,"d",i);
}
}
forward Number2(id);
public Number2(id)
{
GameTextForPlayer(id,"2",1000,3);
SetTimerEx("Number1",1000,0,"d",i);
}
forward Number1(id);
public Number1(id)
{
GameTextForPlayer(id,"1",1000,3);
SetPlayerHealth(id,0);
}
Re: Errors? -
MaykoX - 13.01.2010
amm you will need to define MsgSend and than it will be easy to fix other errors
Re: Errors? -
Babul - 13.01.2010
its a typo:
needs to be
and you provide a parameter too much to the IsPlayerInRangeOfPoint(), the ",183.3526" is not needed to check for being in blueberry ^^
Код:
forward AreaCheck();
public AreaCheck()
{
new MsgSent[MAX_PLAYERS] = 0;
for(new i=0; i<MAX_PLAYERS;i++)
{
if(IsPlayerInRangeOfPoint(i,300.0,232.5435,-146.6228,1.4297)
{
if(MsgSent[i] == 0)
{
GameTextForPlayer(i,"3",1000,3);
MsgSent[i] = 1;
SetTimerEx("MsgUnsent",60000,0,"d",i);
SetTimerEx("Number2",1000,0,"d",i);
}
}
}
}
forward Number2(id);
public Number2(id)
{
GameTextForPlayer(id,"2",1000,3);
SetTimerEx("Number1",1000,0,"d",i);
}
forward Number1(id);
public Number1(id)
{
GameTextForPlayer(id,"1",1000,3);
SetPlayerHealth(id,0);
}
Re: Errors? -
Toad - 13.01.2010
no its just that there are two } missing in areacheck..
Re: Errors? -
[HiC]TheKiller - 13.01.2010
pawn Код:
forward AreaCheck();
public AreaCheck()
{
new MsgSent[MAX_PLAYERS] = 0;
for(new i=0; i<MAX_PLAYERS;i++)
{
if(IsPlayerInRangeOfPoint(i,300.0,232.5435,-146.6228,1.4297,183.3526))
{
if(MsgSent[i] == 0)
{
GameTextForPlayer(i,"3",1000,3);
MsgSend[i] = 1;
SetTimerEx("MsgUnsent",60000,0,"d",i);
SetTimerEx("Number2",1000,0,"d",i);
}
}
forward Number2(id);
public Number2(id)
{
GameTextForPlayer(id,"2",1000,3);
SetTimerEx("Number1",1000,0,"d",i);
}
forward Number1(id);
public Number1(id)
{
GameTextForPlayer(id,"1",1000,3);
SetPlayerHealth(id,0);
}
Re: Errors? -
jameskmonger - 14.01.2010
It gives me these errors:
Код:
C:\Users\James\Desktop\RWRP\gamemodes\crp.pwn(1269) : warning 217: loose indentation
C:\Users\James\Desktop\RWRP\gamemodes\crp.pwn(1272) : warning 217: loose indentation
C:\Users\James\Desktop\RWRP\gamemodes\crp.pwn(1746) : warning 217: loose indentation
C:\Users\James\Desktop\RWRP\gamemodes\crp.pwn(1752) : warning 217: loose indentation
C:\Users\James\Desktop\RWRP\gamemodes\crp.pwn(1758) : warning 217: loose indentation
C:\Users\James\Desktop\RWRP\gamemodes\crp.pwn(1829) : warning 217: loose indentation
C:\Users\James\Desktop\RWRP\gamemodes\crp.pwn(1858) : warning 217: loose indentation
C:\Users\James\Desktop\RWRP\gamemodes\crp.pwn(3372) : warning 217: loose indentation
C:\Users\James\Desktop\RWRP\gamemodes\crp.pwn(3374) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\James\Desktop\RWRP\gamemodes\crp.pwn(3382) : warning 217: loose indentation
C:\Users\James\Desktop\RWRP\gamemodes\crp.pwn(16895) : warning 202: number of arguments does not match definition
C:\Users\James\Desktop\RWRP\gamemodes\crp.pwn(16900) : error 017: undefined symbol "MsgSend"
C:\Users\James\Desktop\RWRP\gamemodes\crp.pwn(16900) : warning 215: expression has no effect
C:\Users\James\Desktop\RWRP\gamemodes\crp.pwn(16900) : error 001: expected token: ";", but found "]"
C:\Users\James\Desktop\RWRP\gamemodes\crp.pwn(16900) : error 029: invalid expression, assumed zero
C:\Users\James\Desktop\RWRP\gamemodes\crp.pwn(16900) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
I change "MsgSend" to "MsgSent" and then I get 12 errors.