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



OnPlayerDeath - krytans - 30.09.2014

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new*weaponid=GetPlayerWeapon(killerid);//Line 11191
****new*weapname[64];//Line 11192
    GetWeaponName(weaponid,*weapname,*sizeof(weapname));
****SetPVarString(playerid,*"gotkilledby",*PlayerRPName(killerid));
****SetPVarString(playerid,*"gotkilledbygun",*weapname);
    return 1;
}
Error Lines
PHP код:
new*weaponid=GetPlayerWeapon(killerid);//Line 11191
****new*weapname[64];//Line 11192 
Errors
PHP код:
RP.pwn(11191) : error 001expected token"-identifier-"but found "*"
RP.pwn(11192) : error 029invalid expressionassumed zero
RP
.pwn(11192) : error 029invalid expressionassumed zero
RP
.pwn(11192) : error 029invalid expressionassumed zero
RP
.pwn(11192) : fatal error 107too many error messages on one line 



Re: OnPlayerDeath - Onfroi - 30.09.2014

Can't you read the errors yourself? What's up with all the asterisks (*) ?


Re: OnPlayerDeath - YanLanger - 30.09.2014

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{

    new weaponid=GetPlayerWeapon(killerid);//Line 11191
    new weapname[64];//Line 11192
    GetWeaponName(weaponid, weapname,sizeof(weapname));
    SetPVarString(playerid, "gotkilledby",PlayerRPName(killerid));
    SetPVarString(playerid, "gotkilledbygun",weapname);
    return 1;
}