20.12.2009, 22:51
public SetPlayerToFactionColor(playerid)
{
if(PlayerInfo[playerid][pFaction] != 255)
{
if(DynamicFactions[PlayerInfo[playerid][pFaction]][fUseColor])
{
if(DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 1)
{
if(CopOnDuty[playerid] == 1)
{
SetPlayerColor(playerid(DynamicFactions[PlayerInfo[playerid][pFaction]][fColor]));
}
else
{
SetPlayerColor(playerid,COLOR_CIVILIAN); // line 13996
}
}
else
{
SetPlayerColor(playerid(DynamicFactions[PlayerInfo[playerid][pFaction]][fColor]));
}
}
}
return 0;
}
this is the function...the string in bold and red is the line 13996.
When I Deleted idx2 and idx, an others errors as occured
C:\Documents and Settings\Spyker\Documenti\File ricevuti\CRP_0.3a\gamemodes\crp.pwn(1595) : warning 217: loose indentation
C:\Documents and Settings\Spyker\Documenti\File ricevuti\CRP_0.3a\gamemodes\crp.pwn(13992) : error 012: invalid function call, not a valid address
C:\Documents and Settings\Spyker\Documenti\File ricevuti\CRP_0.3a\gamemodes\crp.pwn(13992) : warning 215: expression has no effect
C:\Documents and Settings\Spyker\Documenti\File ricevuti\CRP_0.3a\gamemodes\crp.pwn(13992) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Spyker\Documenti\File ricevuti\CRP_0.3a\gamemodes\crp.pwn(13992) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Spyker\Documenti\File ricevuti\CRP_0.3a\gamemodes\crp.pwn(13992) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
if(RegistrationStep[playerid] == 2)
{
if((strcmp("male", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("male")))
{
PlayerInfo[playerid][pSex] = 1;
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[INFO:] You have set your sex to: Male.");
RegistrationStep[playerid] = 0;
TogglePlayerControllable(playerid,1);
PlayerInfo[playerid][pRegistered] = 1;
return 0;
}
else if((strcmp("female", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("female")))
{
PlayerInfo[playerid][pSex] = 2;
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[INFO:] You have set your sex to: Female.");
RegistrationStep[playerid] = 0;
TogglePlayerControllable(playerid,1);
PlayerInfo[playerid][pRegistered] = 1;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_RED, "[INFO:] Invalid sex, type male/female.");
}
return 0; // line 1595
}
-----------------------------------------------------------------------------------------------------
public SetPlayerToFactionColor(playerid)
{
if(PlayerInfo[playerid][pFaction] != 255)
{
if(DynamicFactions[PlayerInfo[playerid][pFaction]][fUseColor])
{
if(DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 1)
{
if(CopOnDuty[playerid] == 1)
{
SetPlayerColor(playerid(DynamicFactions[PlayerInfo[playerid][pFaction]][fColor]));
}
else
{
SetPlayerColor(playerid,COLOR_CIVILIAN);
}
}
else
{
SetPlayerColor(playerid(DynamicFactions[PlayerInfo[playerid][pFaction]][fColor])); // line 13992
}
}
}
return 0;
}
ah...with the delete of idx and idx2, the errors occured on the line 13996 seem to have disappeared...this is a strang things, i guess
{
if(PlayerInfo[playerid][pFaction] != 255)
{
if(DynamicFactions[PlayerInfo[playerid][pFaction]][fUseColor])
{
if(DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 1)
{
if(CopOnDuty[playerid] == 1)
{
SetPlayerColor(playerid(DynamicFactions[PlayerInfo[playerid][pFaction]][fColor]));
}
else
{
SetPlayerColor(playerid,COLOR_CIVILIAN); // line 13996
}
}
else
{
SetPlayerColor(playerid(DynamicFactions[PlayerInfo[playerid][pFaction]][fColor]));
}
}
}
return 0;
}
this is the function...the string in bold and red is the line 13996.
When I Deleted idx2 and idx, an others errors as occured
C:\Documents and Settings\Spyker\Documenti\File ricevuti\CRP_0.3a\gamemodes\crp.pwn(1595) : warning 217: loose indentation
C:\Documents and Settings\Spyker\Documenti\File ricevuti\CRP_0.3a\gamemodes\crp.pwn(13992) : error 012: invalid function call, not a valid address
C:\Documents and Settings\Spyker\Documenti\File ricevuti\CRP_0.3a\gamemodes\crp.pwn(13992) : warning 215: expression has no effect
C:\Documents and Settings\Spyker\Documenti\File ricevuti\CRP_0.3a\gamemodes\crp.pwn(13992) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Spyker\Documenti\File ricevuti\CRP_0.3a\gamemodes\crp.pwn(13992) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Spyker\Documenti\File ricevuti\CRP_0.3a\gamemodes\crp.pwn(13992) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
if(RegistrationStep[playerid] == 2)
{
if((strcmp("male", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("male")))
{
PlayerInfo[playerid][pSex] = 1;
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[INFO:] You have set your sex to: Male.");
RegistrationStep[playerid] = 0;
TogglePlayerControllable(playerid,1);
PlayerInfo[playerid][pRegistered] = 1;
return 0;
}
else if((strcmp("female", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("female")))
{
PlayerInfo[playerid][pSex] = 2;
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[INFO:] You have set your sex to: Female.");
RegistrationStep[playerid] = 0;
TogglePlayerControllable(playerid,1);
PlayerInfo[playerid][pRegistered] = 1;
return 0;
}
else
{
SendClientMessage(playerid, COLOR_RED, "[INFO:] Invalid sex, type male/female.");
}
return 0; // line 1595
}
-----------------------------------------------------------------------------------------------------
public SetPlayerToFactionColor(playerid)
{
if(PlayerInfo[playerid][pFaction] != 255)
{
if(DynamicFactions[PlayerInfo[playerid][pFaction]][fUseColor])
{
if(DynamicFactions[PlayerInfo[playerid][pFaction]][fType] == 1)
{
if(CopOnDuty[playerid] == 1)
{
SetPlayerColor(playerid(DynamicFactions[PlayerInfo[playerid][pFaction]][fColor]));
}
else
{
SetPlayerColor(playerid,COLOR_CIVILIAN);
}
}
else
{
SetPlayerColor(playerid(DynamicFactions[PlayerInfo[playerid][pFaction]][fColor])); // line 13992
}
}
}
return 0;
}
ah...with the delete of idx and idx2, the errors occured on the line 13996 seem to have disappeared...this is a strang things, i guess