Pawno error 010: Invalid function
#1

Код:
C:\Users\Scoot\Desktop\XMG RP\GameModes\grandlarc.pwn(75) : error 010: invalid function or declaration
C:\Users\Scoot\Desktop\XMG RP\GameModes\grandlarc.pwn(78) : error 010: invalid function or declaration
C:\Users\Scoot\Desktop\XMG RP\GameModes\grandlarc.pwn(81) : error 010: invalid function or declaration
C:\Users\Scoot\Desktop\XMG RP\GameModes\grandlarc.pwn(481) : warning 203: symbol is never used: "gArmySpawns"
C:\Users\Scoot\Desktop\XMG RP\GameModes\grandlarc.pwn(481) : warning 203: symbol is never used: "gMedicalSpawns"
C:\Users\Scoot\Desktop\XMG RP\GameModes\grandlarc.pwn(481) : warning 203: symbol is never used: "gPoliceSpawns"
Pawn compiler 3.0.3367			Copyright © 1997-2005, ITB CompuPhase


3 Errors.
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/pdopen", cmdtext, true) == 0)
	MoveObject(Gate, 1541.80005, -1636.90002, 12.4, 0, 0, 270, 1);
	MoveObject(Gate2, 1542, -1618.69995, 12.4, 0, 0, 270, 1);
	return 1;
	}
	
	if (strcmp("/pdclose, cmdtext, true) == 0)
	MoveObject(Gate, 1541.80005, -1631.69995, 12.4, 0, 0, 270, 1);
	MoveObject(Gate2, 1542, -1623.80005, 12.4, 0, 0, 268, 1);
	return 1;
	}
	
	return 0;
}
I keep getting the error.
Reply
#2

Having opening braces after your two if statements might help. Also a closing " in the second one:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/pdopen", cmdtext, true) == 0)
    {
        MoveObject(Gate, 1541.80005, -1636.90002, 12.4, 0, 0, 270, 1);
        MoveObject(Gate2, 1542, -1618.69995, 12.4, 0, 0, 270, 1);
        return 1;
    }
   
    if (strcmp("/pdclose", cmdtext, true) == 0)
    {
        MoveObject(Gate, 1541.80005, -1631.69995, 12.4, 0, 0, 270, 1);
        MoveObject(Gate2, 1542, -1623.80005, 12.4, 0, 0, 268, 1);
        return 1;
    }
   
    return 0;
}
Reply
#3

Will, i dont think thats going to help, the error is stating that there is a invalid function or declaration - its referring to one of the functions that he is using in the script. Only problem is i cant find the functions that are wrong. i think he may have put the wrong section where the error is occurring.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)