SA-MP Forums Archive
[HELP] 1 Error code - 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: [HELP] 1 Error code (/showthread.php?tid=555753)



[HELP] 1 Error code - Thoma - 08.01.2015

C:\Users\Cody's\Desktop\New folder\gamemodes\LSCNR.pwn(2273) : error 025: function heading differs from prototype
C:\Users\Cody's\Desktop\New folder\gamemodes\LSCNR.pwn(6580) : warning 204: symbol is assigned a value that is never used: "string"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


Re: [HELP] 1 Error code - weedxd - 08.01.2015

We could start with you showing us the lines...


Re: [HELP] 1 Error code - Larceny - 08.01.2015

Code?


Re: [HELP] 1 Error code - Thoma - 08.01.2015

Quote:

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
if(Civilian[issuerid] && GetPlayerWantedLevel(issuerid) == 0)
{
if(GetPlayerTeam(playerid) == Cops)
{
IncreaseWantedLevel(issuerid,4);

SendClientMessage(issuerid,GetPlayerWantedLevel(is suerid),"[CCTV CRIME] - Shooting a Police Officer - Wanted Level Increased.");
}
if(Civilian[playerid] == 1)
{
IncreaseWantedLevel(issuerid,4);

SendClientMessage(issuerid,GetPlayerWantedLevel(is suerid),"[CCTV CRIME] - Shooting Civilians - Wanted Level Increased.");
}
}
return 1;
}

thats the error


Quote:

CMD:takedrugs(playerid,params[])
{
new string[128];
if(sscanf(params,""))
{
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /takedrugs.");
return 1;
}
if(TD[playerid] == 1)
{
SendClientMessage(playerid,COLOR_ERROR,"You are already taking drugs. please wait before you try taking them again.");
return 1;
}
if(Jailed[playerid] >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"You can't use this command while you are jailed.");
return 1;
}
if(JailedA[playerid] >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"You can't use this command while you are jailed.");
return 1;
}
if(Cuffed[playerid] == 1)
{
SendClientMessage(playerid,COLOR_ERROR,"You can't use this command while your are placed in handcuffs.");
return 1;
}
if(IsKidnapped[playerid] == 1)
{
SendClientMessage(playerid,COLOR_ERROR,"You can't use this command while you are kidnapped.");
return 1;
}
if(Freezed[playerid] == 1)
{
SendClientMessage(playerid,COLOR_ERROR,"You can't use this command while you are freezed.");
return 1;
}
IncreaseWantedLevel(playerid,3);
HasWeed[playerid] -= 10;
High[playerid] = 20;
TD[playerid] = 1;
ApplyAnimation(playerid,"PED","WALK_drunk",4.1,1,1 ,1,0,0,1);
SendClientMessage(playerid,COLOR_ORANGE,"You have smoked 10 grams of weed. You are feeling very HIGH now.");
SendClientMessage(playerid,GetPlayerWantedLevel(pl ayerid),"Crime Committed - Drug Abuse - Wanted Level Increased.");
return 1;
}

thats the warning


Re: [HELP] 1 Error code - Larceny - 08.01.2015

Error: Be sure you are using the latest include files.

Warning: You already have an array named "string". Change the name of one of them.

I advise you to use better names for global variables.


Re: [HELP] 1 Error code - Rabea - 08.01.2015

update includes


Re: [HELP] 1 Error code - Vince - 08.01.2015

Why does everyone use the quote tag for code? The quote tag is for quotes, the code tag (and by extension the Pawn tag) is for code. Very straightforward, right? Why am I saying this? Because the quote tag does not preserve indentation. I do not even attempt to read such mess.


Re: [HELP] 1 Error code - Thoma - 08.01.2015

Now i got this and all the includes are updated


C:\Users\Cody's\Desktop\MY CnR Script\pawno\include\YSI\y_hooks/impl.inc(1755) : error 025: function heading differs from prototype

Код:
	   {
	      SendClientMessage(playerid,COLOR_ERROR,"You have left the checkpoint robbery failed...");
		  RobbingDance[playerid] = 0;
		  DanceRobbedRecently = 180;
	   }
Quote:
Originally Posted by Vince
Посмотреть сообщение
Why does everyone use the quote tag for code? The quote tag is for quotes, the code tag (and by extension the Pawn tag) is for code. Very straightforward, right? Why am I saying this? Because the quote tag does not preserve indentation. I do not even attempt to read such mess.
here then error2.pwn


Re: [HELP] 1 Error code - Thoma - 08.01.2015

i do believe thats an y-less error right?