3 Errors
#1

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
pawn Код:
//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
Reply
#2

pawn Код:
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;
}
Reply
#3

still 3 errors
Reply
#4

i still get these 3 errors:
Quote:

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( 49 : warning 203: symbol is never used: "SetPlayerTeamFromClass"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.

Reply
#5

Can you show what lines give the errors please?
Reply
#6

pawn Код:
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;
}
Reply
#7

Have you added
pawn Код:
new gTeam[MAX_PLAYERS];
at the top of your script under your includes?

Have you defined your teams?
pawn Код:
#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.
Reply
#8

i still get those errors, after have added it
Reply
#9

i found the problem, forgot the 0 1 2 3 after the defines Thanks for help
Reply
#10

Quote:
Originally Posted by CrazyChoco
Посмотреть сообщение
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...?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)