SA-MP Forums Archive
Big problem please help ! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Big problem please help ! (/showthread.php?tid=350053)



Big problem please help ! - Rg-Gaming.Info - 11.06.2012

Hello guys i have a little problem here every time i try to implement this function into OnPlayerDeath i get
Код:
invalid subscript (not an array or too many subscripts): "pScore"
expression has no effect
expected token: ";", but found "]"
invalid expression, assumed zero
too many error messages on one line
That is for the line:
Код:
pScore[killerid]++;

pawn Код:
SendDeathMessage(killerid, playerid, reason);
 
    if(killerid != INVALID_PLAYER_ID)
    {
        pScore[killerid]++;
        SetPlayerScore(killerid, pScore[killerid]);
 
        pCash[killerid] += 100;
        GivePlayerMoney(killerid, 100);
    }
 
    pDeaths[playerid]++;
    pCash[playerid] -= 100;
    pScore[playerid]--;
    SetPlayerScore(playerid, pScore[playerid]);
    ResetPlayerMoney(playerid);
    GivePlayerMoney(playerid, pCash[playerid]);
Any idea how to fix it ? I took it from the wiki.


Re: Big problem please help ! - $$inSane - 11.06.2012

what the mess u have done
just tell what u want to do on death


Re: Big problem please help ! - $$inSane - 11.06.2012

and please post this topic on scripting discussions instead server support


Re: Big problem please help ! - JhnzRep - 11.06.2012

Quote:
Originally Posted by $$inSane
Посмотреть сообщение
and please post this topic on scripting discussions instead server support
Please stop double posting after 3 minutes :P


Re: Big problem please help ! - Littlehelper - 11.06.2012

Are you sure you arent using enums?
Wrong section, must be posted in Scripting Discussion as it is related to scripting.


Re: Big problem please help ! - Rg-Gaming.Info - 11.06.2012

Sorry for wrong section. And yes i am using enums. You can see my code that i try to put this on onto my GM BFTDM.


Re: Big problem please help ! - Jhero - 11.06.2012

Quote:
Originally Posted by Rg-Gaming.Info
Посмотреть сообщение
Sorry for wrong section. And yes i am using enums. You can see my code that i try to put this on onto my GM BFTDM.
Yeah, post this in Scripting Discussion section. That's where all the experienced scripters browse, finding threads to assist people.