SA-MP Forums Archive
zcmd error - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: zcmd error (/showthread.php?tid=180443)



zcmd error - eXtr1kE - 01.10.2010

error :

Код:
C:\SaMp 0.3b R2\gamemodes\gf.pwn(10894) : warning 209: function "cmd_househelp" should return a value
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:           8220 bytes
Code size:          1379020 bytes
Data size:         24807148 bytes
Stack/heap size:      16384 bytes; estimated max. usage=4124 cells (16496 bytes)
Total requirements:26210772 bytes

1 Warning.
script :

Код:
CMD:helperhelp(playerid, params[])
{
    if(IsPlayerConnected(playerid)) {
		SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
		if (PlayerInfo[playerid][pHelper] >= 1) { SendClientMessage(playerid, COLOR_GRAD1, "*1* HELPER *** /goto /h(elper) chat /unfreeze /hsay"); }
		if (PlayerInfo[playerid][pHelper] == 2) { SendClientMessage(playerid, COLOR_GRAD1, "*2* HELPER *** /goto /h(elper) chat /unfreeze /hsay"); }
		if (PlayerInfo[playerid][pHelper] == 3) { SendClientMessage(playerid, COLOR_GRAD1, "*3* HELPER *** /goto /h(elper) chat /unfreeze /hsay"); }
		if (PlayerInfo[playerid][pHelper] == 4) { SendClientMessage(playerid, COLOR_GRAD1, "*4* HELPER *** /goto /h(elper) chat /unfreeze /hsay /makehelper"); }
		SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
	}
	return 1;
}



Re: zcmd error - [XST]O_x - 01.10.2010

The compiler says there's a problem with 'cmd_househelp', you're showing us your 'CMD:helperhelp" script.
And the error means you should return a value, put 'return 1;' at the end of the command.


Re: zcmd error - Mauzen - 01.10.2010

The warning is from cmd_househelp, the code you showed is cmd_helperhelp

Probably you forgot the return 1 there.