pScore
#1

Anyone knows why this warnings occur?

Код:
.pwn(287) : warning 219: local variable "pScore" shadows a variable at a preceding level
.pwn(288) : warning 213: tag mismatch
.pwn(287) : warning 204: symbol is assigned a value that is never used: "pScore"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Here is the line 287 and 288

pawn Код:
287       new pScore = GetPlayerScore(killerid);
288       SetPlayerScore(killerid, pScore + 1 );
Reply
#2

Код:
288        SetPlayerScore(playerid, pscore +1);
ass for line 287 i dont know...
Reply
#3

Quote:
Originally Posted by [A]ndrei
Посмотреть сообщение
Код:
288        SetPlayerScore(playerid, pscore +1);
ass for line 287 i dont know...
This is under public OnPlayerDeath(playerid, killerid, reason)

I want to add 1 score to the killer, not to player that was killed.

Thanks for the reply though
Reply
#4

pawn Код:
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
Reply
#5

Fixed! Thanks for your help!
Reply
#6

oh sorry about that then...i got the wrong idea :P anyways in that case
Код:
SetPlayerScore(killerid, GivePlayerScore +1);
Reply
#7

Quote:
Originally Posted by [A]ndrei
Посмотреть сообщение
oh sorry about that then...i got the wrong idea :P anyways in that case
Код:
SetPlayerScore(killerid, GivePlayerScore +1);
No such GivePlayerScore

Anyway, Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)