SA-MP Forums Archive
3 Errors - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: 3 Errors (/showthread.php?tid=360612)



3 Errors (Solved) - CrazyChoco - 18.07.2012

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


Re: 3 Errors - tiernantheman - 18.07.2012

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;
}



Re: 3 Errors - CrazyChoco - 18.07.2012

still 3 errors


Re: 3 Errors - CrazyChoco - 18.07.2012

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.




Re: 3 Errors - tiernantheman - 18.07.2012

Can you show what lines give the errors please?


Re: 3 Errors - .Wicked - 18.07.2012

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;
}



Re: 3 Errors - clarencecuzz - 18.07.2012

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.


Re: 3 Errors - CrazyChoco - 18.07.2012

i still get those errors, after have added it


Re: 3 Errors - CrazyChoco - 18.07.2012

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


Re: 3 Errors - clarencecuzz - 18.07.2012

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...?