PDA

View Full Version : 3 Errors


CrazyChoco
18/07/2012, 12:37 PM
Im Getting these 3 errors

C:\Users\Kajinth\Desktop\SAMP\gamemodes\sfcnr.pwn( 307) : error 029: invalid expression, assumed zero
C:\Users\Kajinth\Desktop\SAMP\gamemodes\sfcnr.pwn( 312) : error 029: invalid expression, assumed zero
C:\Users\Kajinth\Desktop\SAMP\gamemodes\sfcnr.pwn( 322) : error 029: invalid expression, assumed zero
and my code is
//Teams
if(gTeam[playerid] == TEAM_COP) {
SendClientMessage(playerid,0x1E90FFAA, "Type {FFFFFF}/commands{1E90FF} for your commands");
SendClientMessage(playerid,0x1E90FFAA, "POLICE OFFICER: Your job is to keep criminals off the streets of San Andreas");
SendClientMessage(playerid,0x1E90FFAA, "Remember: This is not a deathmatch server. Please abide by the /rules and enjoy");
SendClientMessage(playerid,0x1E90FFAA, "Due to you being a cop, your bank insurance has been paid for automaticly.");
}else if(gTeam[playerid] == TEAM_BISTRO) {

SendClientMessage(playerid,0x1E90FFAA, "Type {FFFFFF}/commands{1E90FF} for your commands");
SendClientMessage(playerid,0x1E90FFAA, "BISTRO STAFF: Your job is to sell food to other players if their health less than full");
SendClientMessage(playerid,0x1E90FFAA, "Look out for players needing food on the chat");
SendClientMessage(playerid,0x1E90FFAA, "You can sell players bad food and infect them with food poisining");
SendClientMessage(playerid,0x1E90FFAA, "You can also sell healthy, non infected food");
SendClientMessage(playerid,0x1E90FFAA, "Remember: This is not a deathmatch server. Please abide by the /rules and enjoy");


}else if(gTeam[playerid] == TEAM_DRIVER) {

SendClientMessage(playerid,0x1E90FFAA, "Type {FFFFFF}/commands{1E90FF} for your commands");
SendClientMessage(playerid,0x1E90FFAA, "DRIVER: You can take players in your vehicle and drop them of for cash");
SendClientMessage(playerid,0x1E90FFAA, "You can only use a Taxi, Limo, Maverick or a Coach to earn points");
SendClientMessage(playerid,0x1E90FFAA, "Remember: This is not a deathmatch server. Please abide by the /rules and enjoy");

}
I cant find the problem

tiernantheman
18/07/2012, 12:40 PM
if(gTeam[playerid] == TEAM_COP)
{
SendClientMessage(playerid,0x1E90FFAA, "Type {FFFFFF}/commands{1E90FF} for your commands");
SendClientMessage(playerid,0x1E90FFAA, "POLICE OFFICER: Your job is to keep criminals off the streets of San Andreas");
SendClientMessage(playerid,0x1E90FFAA, "Remember: This is not a deathmatch server. Please abide by the /rules and enjoy");
SendClientMessage(playerid,0x1E90FFAA, "Due to you being a cop, your bank insurance has been paid for automaticly.");
}
else if(gTeam[playerid] == TEAM_BISTRO)
{
SendClientMessage(playerid,0x1E90FFAA, "Type {FFFFFF}/commands{1E90FF} for your commands");
SendClientMessage(playerid,0x1E90FFAA, "BISTRO STAFF: Your job is to sell food to other players if their health less than full");
SendClientMessage(playerid,0x1E90FFAA, "Look out for players needing food on the chat");
SendClientMessage(playerid,0x1E90FFAA, "You can sell players bad food and infect them with food poisining");
SendClientMessage(playerid,0x1E90FFAA, "You can also sell healthy, non infected food");
SendClientMessage(playerid,0x1E90FFAA, "Remember: This is not a deathmatch server. Please abide by the /rules and enjoy");
}
else if(gTeam[playerid] == TEAM_DRIVER)
{
SendClientMessage(playerid,0x1E90FFAA, "Type {FFFFFF}/commands{1E90FF} for your commands");
SendClientMessage(playerid,0x1E90FFAA, "DRIVER: You can take players in your vehicle and drop them of for cash");
SendClientMessage(playerid,0x1E90FFAA, "You can only use a Taxi, Limo, Maverick or a Coach to earn points");
SendClientMessage(playerid,0x1E90FFAA, "Remember: This is not a deathmatch server. Please abide by the /rules and enjoy");
}
return 1;
}

CrazyChoco
18/07/2012, 12:41 PM
still 3 errors

CrazyChoco
18/07/2012, 12:46 PM
i still get these 3 errors:
C:\Users\Kajinth\Desktop\SAMP\gamemodes\sfcnr.pwn( 307) : error 029: invalid expression, assumed zero
C:\Users\Kajinth\Desktop\SAMP\gamemodes\sfcnr.pwn( 314) : error 029: invalid expression, assumed zero
C:\Users\Kajinth\Desktop\SAMP\gamemodes\sfcnr.pwn( 323) : error 029: invalid expression, assumed zero
C:\Users\Kajinth\Desktop\SAMP\gamemodes\sfcnr.pwn( 498) : warning 203: symbol is never used: "SetPlayerTeamFromClass"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.

tiernantheman
18/07/2012, 12:53 PM
Can you show what lines give the errors please?

.Wicked
18/07/2012, 12:54 PM
public OnPlayerSpawn(playerid)
{
if(gTeam[playerid] == TEAM_COP)
{
SendClientMessage(playerid,0x1E90FFAA, "Type {FFFFFF}/commands{1E90FF} for your commands");
SendClientMessage(playerid,0x1E90FFAA, "POLICE OFFICER: Your job is to keep criminals off the streets of San Andreas");
SendClientMessage(playerid,0x1E90FFAA, "Remember: This is not a deathmatch server. Please abide by the /rules and enjoy");
SendClientMessage(playerid,0x1E90FFAA, "Due to you being a cop, your bank insurance has been paid for automaticly.");
}
else if(gTeam[playerid] == TEAM_BISTRO)
{
SendClientMessage(playerid,0x1E90FFAA, "Type {FFFFFF}/commands{1E90FF} for your commands");
SendClientMessage(playerid,0x1E90FFAA, "BISTRO STAFF: Your job is to sell food to other players if their health less than full");
SendClientMessage(playerid,0x1E90FFAA, "Look out for players needing food on the chat");
SendClientMessage(playerid,0x1E90FFAA, "You can sell players bad food and infect them with food poisining");
SendClientMessage(playerid,0x1E90FFAA, "You can also sell healthy, non infected food");
SendClientMessage(playerid,0x1E90FFAA, "Remember: This is not a deathmatch server. Please abide by the /rules and enjoy");
}
else if(gTeam[playerid] == TEAM_DRIVER)
{
SendClientMessage(playerid,0x1E90FFAA, "Type {FFFFFF}/commands{1E90FF} for your commands");
SendClientMessage(playerid,0x1E90FFAA, "DRIVER: You can take players in your vehicle and drop them of for cash");
SendClientMessage(playerid,0x1E90FFAA, "You can only use a Taxi, Limo, Maverick or a Coach to earn points");
SendClientMessage(playerid,0x1E90FFAA, "Remember: This is not a deathmatch server. Please abide by the /rules and enjoy");
}
return 1;
}

clarencecuzz
18/07/2012, 12:56 PM
Have you added
new gTeam[MAX_PLAYERS];
at the top of your script under your includes?

Have you defined your teams?
#define TEAM_COP 0
#define TEAM_BISTRO 1
#define TEAM_DRIVER 2

Answer me these questions, and apply them to your script, then tell me if you return any errors.

CrazyChoco
18/07/2012, 01:08 PM
i still get those errors, after have added it

CrazyChoco
18/07/2012, 01:10 PM
i found the problem, forgot the 0 1 2 3 after the defines Thanks for help

hulitubolies
18/07/2012, 01:12 PM
Show me the lines error
like

352 #define TEAM_COP 0

clarencecuzz
18/07/2012, 01:16 PM
i still get those errors, after have added it

So you got the errors after I posted the correct code... then you fixed it and you got no errors... but what I posted was exactly what you did to fix it...?

CrazyChoco
18/07/2012, 01:18 PM
yea, thanks for the help :D