Pawno error 010: Invalid function - 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: Pawno error 010: Invalid function (
/showthread.php?tid=417142)
Pawno error 010: Invalid function -
Gecko75 - 19.02.2013
Код:
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.
Re: Pawno error 010: Invalid function -
WillWinter - 19.02.2013
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;
}
Re: Pawno error 010: Invalid function -
Zempist - 19.02.2013
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.