open.mp forum
Error 010: invalid funciton or declaration - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: General Discussions (https://forum.open.mp/forumdisplay.php?fid=6)
--- Thread: Error 010: invalid funciton or declaration (/showthread.php?tid=2432)



Error 010: invalid funciton or declaration - DDRfx10 - 2023-07-23

Hello, I've been trying to make a gamemode for SA-MP, and in a command for giving yourself a weapon "/weapon" I get the 010 error. No matter what I do, nothing fixes it.
Log:
D:\SAMPSERVER\gamemodes\COI.pwn(245) : error 055: start of function body without function header
D:\SAMPSERVER\gamemodes\COI.pwn(248) : error 010: invalid function or declaration
D:\SAMPSERVER\gamemodes\COI.pwn(249) : error 010: invalid function or declaration
D:\SAMPSERVER\gamemodes\COI.pwn(250) : error 010: invalid function or declaration
D:\SAMPSERVER\gamemodes\COI.pwn(252) : warning 203: symbol is never used: "ammo"
D:\SAMPSERVER\gamemodes\COI.pwn(252) : warning 203: symbol is never used: "weaponid"
Pawn compiler 3.10.4 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


Part of the code which Pawno is referring to:
244: CMD:weapon(playerid, params[]);
245: {
246: new weaponid, ammo;
247:
248: if(sscanf(params, "ii", weaponid, ammo))
249:     return ClientMSG(playerid, COL_SUNYELLOW, "Usage: /weapon [ID] [AMMO]
250: return 1;
251: }


I was making the command, so that's why it looks incomplete.
Can someone help me with this?


RE: Error 010: invalid funciton or declaration - Coool - 2023-07-23

You have a stray semicolon on line 244