SA-MP Forums Archive
NEED 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: NEED HELP (/showthread.php?tid=585449)



NEED HELP - Viki - 14.08.2015

i just used the headshot script and here it is
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9)
    {
    SetPlayerHealth(playerid, 0);
    GameTextForPlayer(issuerid,"~r~Headshot",2000,3) && GameTextForPlayer(playerid,"~r~Headshot",2000,3);
    PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0)  && PlayerPlaySound(issuerid, 17802, 0.0, 0.0, 0.0);
    }
    return 1;
}
i get the error
Код:
C:\Users\Waqar\Desktop\z\The Ultimate Freeroam\gamemodes\freeroam.pwn(3907) : error 025: function heading differs from prototype
the error line is
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)



Re: NEED HELP - Roberto80 - 14.08.2015

Ise this:
Код:
forward OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart);



Re: NEED HELP - Andre02 - 14.08.2015

Quote:
Originally Posted by Roberto80
Посмотреть сообщение
Ise this:
Код:
forward OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart);
You don't need to forward OnPlayerTakeDamage it's already a Callback

The problem comes from YSI\y_als , check out this link to fix it: https://sampforum.blast.hk/showthread.php?tid=488198


Re: NEED HELP - J0sh... - 14.08.2015

Make sure you have the 0.3.7 includes also.
The bodypart parameter was added in 0.3z's includes.


Re: NEED HELP - Viki - 14.08.2015

Код:
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(8697) : error 021: symbol already defined: "S@@_OnPlayerTakeDamage"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
NEW ERROR does this matter?


Re: NEED HELP - Andre02 - 14.08.2015

Quote:
Originally Posted by Viki
Посмотреть сообщение
Код:
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(8697) : error 021: symbol already defined: "S@@_OnPlayerTakeDamage"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
NEW ERROR does this matter?
You did what Roberto told you to do didn't you ?
That is wrong, OnPlayerTakeDamage is already a default callback so there is no need to forward it!

Just do what is in this thread: https://sampforum.blast.hk/showthread.php?tid=488198
and done it will be fixed!
The problem comes from YSI\y_hooks\impl.inc & YSI\y_als\impl.inc includes, read more about it in that topic


Re: NEED HELP - Andre02 - 14.08.2015

Found this:
http://www.mediafire.com/download/yx...pl/include.zip
Go to pawno\include and delete your YSI files now Just download the YSI in the link above and put it on pawno\include
it should be fixed

Link by FunnyBear


Re: NEED HELP - Viki - 14.08.2015

thank you so much for finding the link i really appreciate that,but i have new errors -_-
Код:
C:\Users\Waqar\Desktop\z\pawno\include\sscanf2.inc(199) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\sscanf2.inc(305) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\sscanf2.inc(305) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\sscanf2.inc(365) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\sscanf2.inc(365) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\YSI\y_utils.inc(343) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\YSI\y_utils.inc(497) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\YSI\y_utils.inc(540) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\YSI\y_utils.inc(558) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\YSI\y_va/impl.inc(568) : warning 219: local variable "time" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\YSI\y_va/impl.inc(573) : warning 219: local variable "time" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\YSI\y_malloc.inc(216) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\YSI\y_hooks/impl.inc(225) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\YSI\y_hooks/impl.inc(2629) : warning 219: local variable "time" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\YSI\y_inline.inc(260) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\YSI\y_inline.inc(678) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\YSI\y_ini.inc(837) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\YSI\y_ini.inc(957) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\YSI\y_ini.inc(1030) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\YSI\y_ini.inc(1051) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\YSI\y_ini.inc(1070) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\YSI\y_ini.inc(1092) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\YSI\y_ini.inc(1124) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\YSI\y_ini.inc(1160) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\YSI\y_ini.inc(1188) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\pawno\include\YSI\y_ini.inc(1344) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(555) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(619) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(861) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(899) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(1138) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(1215) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(1232) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(1260) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(1276) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(1639) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(1889) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(2296) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(2320) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(2344) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(2368) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(2392) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(2416) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(2483) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(3273) : error 021: symbol already defined: "S@@_OnGameModeInit"
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(3275) : warning 209: function "S@@_OnGameModeInit" should return a value
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(3278) : error 021: symbol already defined: "S@@_OnPlayerUpdate"
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(3280) : warning 209: function "S@@_OnPlayerUpdate" should return a value
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(3282) : error 001: expected token: "(", but found "-identifier-"
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(3282) : error 001: expected token: ";", but found "("
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(3286) : error 001: expected token: ";", but found "for"
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(3288) : error 010: invalid function or declaration
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(3294) : error 010: invalid function or declaration
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(3325) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(3355) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(3526) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(3804) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(3864) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4016) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4166) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4194) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4255) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4292) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4334) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4362) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4403) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4540) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4554) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4573) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4586) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4602) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4612) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4712) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4745) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4775) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4775) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4802) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4811) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4819) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4865) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4892) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4922) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4952) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(4991) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(5105) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(5131) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(5223) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(5267) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(5297) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(5363) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(5389) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(5435) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(5454) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(5474) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(5509) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(5540) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(5573) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(5593) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(5622) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(5713) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(5744) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(5780) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(5824) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(5875) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(6015) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(6100) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(6108) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(6116) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(6132) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(6192) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(6320) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(6328) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(7148) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(7156) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(7164) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(7172) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(8371) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(8553) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(8696) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(8724) : error 021: symbol already defined: "S@@_OnPlayerTakeDamage"
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(8733) : warning 203: symbol is never used: "name"
C:\Users\Waqar\Desktop\z\gamemodes\zombie.pwn(8733) : warning 203: symbol is never used: "string"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


8 Errors.



Re: NEED HELP - Viki - 14.08.2015

i am not a scripter so you know,i just wanted to make sure then am i pasting the script at the right place if yes i can then show you all the lines
http://imgur.com/Z24NzKW
http://imgur.com/45iFOni
http://imgur.com/GYqVrMK


Re: NEED HELP - Andre02 - 14.08.2015

Do you have TeamViewer, i can help you out easier using it ?