SA-MP Forums Archive
їPor quй estos errores? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: їPor quй estos errores? (/showthread.php?tid=575340)



їPor quй estos errores? - Fagrinht - 25.05.2015

Код:
Lнnea "CMD:aceptar(playerid, params[])" = warning 209: function "cmd_aceptar" should return a value

Lнnea "return 1;"(El ъltimo return1 )" = error 010: invalid function or declaration

	CMD:aceptar(playerid, params[])
	{
		if(strcmp(params,"entrevista",true) == 0)
		{
			if(LiveOffer[playerid] < 999)
			{
				if(IsPlayerConnected(LiveOffer[playerid]))
				{
					if (ProxDetectorS(5.0, playerid, LiveOffer[playerid]))
					{
						SendClientMessage(playerid, -1, "* Estarбs congelado hasta que termine la entrevista.");
						SendClientMessage(LiveOffer[playerid], -1, "* Estбs congelado hasta que termine la entrevista. (usa /live again).");
						//TogglePlayerControllable(playerid, 0);
						//TogglePlayerControllable(LiveOffer[playerid], 0);
						TalkingLive[playerid] = LiveOffer[playerid];
						TalkingLive[LiveOffer[playerid]] = playerid;
						LiveOffer[playerid] = 999;
						return 1;
					}
					else return SendClientMessage(playerid, -1, "Estбs lejos del reportero!");
				}
				return 1;
			}
		}
	}
	return 1;
	}



Re: їPor quй estos errores? - Choidito - 25.05.2015

Tienes un "{" de mas,el primer return no esta bien posiciуnado.