SA-MP Forums Archive
1 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)
+--- Thread: 1 Error (/showthread.php?tid=575932)



1 Error - ZachKnoxx - 31.05.2015

I've been tweaking this around for an hour and haven't gotten it working. I would really appreciate some help.
Код HTML:
C:\Users\Zach\Desktop\Folders\Servers\SAMP\SamZach\gamemodes\rp.pwn(537) : error 025: function heading differs from prototype
Код HTML:
forward TD();
public TD()
{
	new rand = random(4);
	switch(rand)
	{
		case 0:
		{
			TextDrawSetString(Textdraw56,"Ask questions in /n and report annoyances in /report!");
		}
		case 1:
		{
			TextDrawSetString(Textdraw56,""SERVER_NAME" was founded by ~y~Zachary and Kennington!");
		}
		case 2:
		{
			TextDrawSetString(Textdraw56,"Deathmatching(DM) is not tolerated and you will be punished.");
		}
		case 3:
		{
			TextDrawSetString(Textdraw56,"Using hacks is not allowed! This includes most cleos and 3rd party modifications.");
		}
		case 4:
		{
			TextDrawSetString(Textdraw56,"Type /help for a full list of all available commands.");
		}
	}
	return 1;
}
public OnPlayerRequestClass(classid) // LINE WITH THE ERROR
{
	new playerid;
	if(!IsPlayerLogged(playerid)) return Kick(playerid);
	SetSpawnInfo(NO_TEAM, PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pPositionX], PlayerInfo[playerid][pPositionY], PlayerInfo[playerid][pPositionZ], PlayerInfo[playerid][pFacingAngle], 0, 0, 0, 0, 0, 0);
	SpawnPlayer(playerid);
    TextDrawHideForPlayer(playerid,Textdraw0);
    TextDrawHideForPlayer(playerid,Textdraw1);
    TextDrawHideForPlayer(playerid,Textdraw2);
    TextDrawHideForPlayer(playerid,Textdraw3);
    TextDrawHideForPlayer(playerid,Textdraw4);
    TextDrawHideForPlayer(playerid,Textdraw5);
    TextDrawHideForPlayer(playerid,Textdraw6);
    TextDrawHideForPlayer(playerid,Textdraw7);
	return 1;
}



Re: 1 Error - justice96 - 31.05.2015

Replace:
Код:
public OnPlayerRequestClass(classid)
To:
Код:
public OnPlayerRequestClass(playerid,classid)



Re: 1 Error - ZachKnoxx - 31.05.2015

Quote:
Originally Posted by justice96
Посмотреть сообщение
Replace:
Код:
public OnPlayerRequestClass(classid)
To:
Код:
public OnPlayerRequestClass(playerid,classid)
ty, +rep