• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error 010: invalid funciton or declaration
#1
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?
  Reply
#2
You have a stray semicolon on line 244
  Reply


Forum Jump: