syntax error in the expression, or invalid function call
#1

Here is my code:
Код:
 if(Player[playerid][Job] == 3)
    {
        if(Player[playerid][JobSalary]>gettime())
        {
			if(Player[playerid][JobLevel]==1)
			{
       			if(Player[playerid][JobSalary]>gettime)
			    {
	       			GivePlayerMoney(playerid, 250000);
				    Player[playerid][JobSalary] = gettime()+604800;
				    UpdatePlayerJobSalary(playerid);
				    SendClientMessage(playerid,COLOR_BLUE,"You gained {008040}$250K{0000FFFF} salary. Next salary after 1 week.");
				}			}
			else if(Player[playerid][JobLevel]==2)
				{
	       			if(Player[playerid][JobSalary]>gettime)
				    {
		       			GivePlayerMoney(playerid, 500000);
					    Player[playerid][JobSalary] = gettime()+604800;
					    UpdatePlayerJobSalary(playerid);
					    SendClientMessage(playerid,COLOR_BLUE,"You gained {008040}$500K{0000FFFF} salary. Next salary after 1 week.");
					}
				}
			else if(Player[playerid][JobLevel]==3)
			{
			    if(Player[playerid][JobSalary]>gettime)
			    {
	       			GivePlayerMoney(playerid, 750000);
				    Player[playerid][JobSalary] = gettime()+604800;
				    UpdatePlayerJobSalary(playerid);
				    SendClientMessage(playerid,COLOR_BLUE,"You gained {008040}$750K{0000FFFF} salary. Next salary after 1 week.");
				}
			}
        }
    }
    else
    {
        SendClientMessage(playerid,-1,"{FF0000}[{FFFF00}Fire Department{FF0000}]:{FFFFFF}Your salary is not ready yet!");
    }
	return 1;
Errors
Код:
D:\GTA San Andreas\Server\gamemodes\mysql1.pwn(856) : error 076: syntax error in the expression, or invalid function call
D:\GTA San Andreas\Server\gamemodes\mysql1.pwn(865) : error 076: syntax error in the expression, or invalid function call
D:\GTA San Andreas\Server\gamemodes\mysql1.pwn(875) : error 076: syntax error in the expression, or invalid function call
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Reply
#2

Would help out if you highlighted which lines were what from the error... Just so people don't have to guess which lines are causing this.
Reply
#3

What code is on those lines? 856, 865, 875.

If I count them they indicate its, UpdatePlayerJobSalary(playerid);

You are missing a parameter there, this is what the error shows. So check it, mostly I think it must be UpdatePlayerJobSalary(playerid,JobSalary); or so.

Search the script for UpdatePlayerJobSalary and check its parameters.
Reply
#4

Send us your stock or function UpdatePlayerJobSalary...
Reply
#5

Sorry i got the problem solution and solved it!

Problem is in gettime :P

I typed this
if(Player[playerid][JobSalary]>gettime)

Correct is this
if(Player[playerid][JobSalary]>gettime())

Thanks all for responding my topic
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)