SA-MP Forums Archive
foreach error [HELP] - 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: foreach error [HELP] (/showthread.php?tid=483371)



foreach error [HELP] - count.php - 25.12.2013

Hello, I have house system and my foreach plugin it's new, but It's not working.

Код:
na\system\accounts.pwn(336) : warning 204: symbol is assigned a value that is never used: "hash"
na\system\house.pwn(45) : error 001: expected token: "-identifier-", but found "-tagname-"
na\system\house.pwn(45) : error 010: invalid function or declaration
na\system\house.pwn(45) : error 021: symbol already defined: "Itter_ClearInternal"
na\system\house.pwn(45) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
45:
Код:
Itter_Clear(Namai,NAMU_RIBA);
PLEASE HELP


Re: foreach error [HELP] - Raisingz - 25.12.2013

Probably on your line 44 you're missing a " ; " ?
(First guess)


Re: foreach error [HELP] - count.php - 25.12.2013

Код:
#if defined _namai_ikelta
  #endinput
#endif
#define _namai_ikelta


static
	bool:namai_OPKSC = false;

enum
	namu_mas
{
	nid,
	nsavininkas,
	Float:nx,
	Float:ny,
	Float:nz,
	nint,
	nnuoma,
	nnumeris,
	ngatve,
	bool:nraktas,
	nverte,
	nVirtualWorld,
	nInterior,
	nRadijas,
	nTelevision,
	nPlayingStation
}

Itter_Clear(namai,NAMU_RIBA);

new
	NamuDuom[ NAMU_RIBA ][ namu_mas ],
	NamuInv [ NAMU_RIBA ][ 12 ],
	NamuPick[ NAMU_RIBA];
	



enum
	intInfo
{
	Float:intX,
	Float:intY,
	Float:intZ,
	intID
}



Re: foreach error [HELP] - Raisingz - 25.12.2013

As I expected, you're missing a ";" after the closing } of the enum.
I haven't been programming in PAWNO for a long time, but I think that you need to close enums with };
Try it


Re: foreach error [HELP] - count.php - 25.12.2013

Nope still nothing


Re: foreach error [HELP] - Konstantinos - 25.12.2013

Add:
pawn Код:
Itter_Clear(namai,NAMU_RIBA);
inside a callback.


Re: foreach error [HELP] - count.php - 25.12.2013

I added it on GameModeInit, but still doesen't work wtf...