[Pomoc]PlayerInfo[killerid][Points]

Započeo Quality Samp, Septembar 03, 2011, 06:19:14 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:Moja
Detaljan opis problema:Dakle kada igrac ubije drugog igraca,da dobije jedan poen,koji je nevezan za score,i da,kada se igrac spawna,ovisno o broju sakupljenih poena dobije oruzje...Ja sam bio nesto napravio al sam tolko zbagovo da sam obrisao,nakon toga sam ovako uradio...
Dio skripte:

public OnPlayerDeath(playerid, killerid, reason)
{

GivePlayerMoney(killerid, 1000);
    SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
PlayerInfo[killerid][Points] += 1;
return 1;
}

i izbaci mi ovakve errore
C:\Documents and Settings\mirac\Desktop\Misije\gamemodes\Mission10.pwn(420) : warning 213: tag mismatch
C:\Documents and Settings\mirac\Desktop\Misije\gamemodes\Mission10.pwn(420) : warning 215: expression has no effect
C:\Documents and Settings\mirac\Desktop\Misije\gamemodes\Mission10.pwn(420) : error 001: expected token: ";", but found "["
C:\Documents and Settings\mirac\Desktop\Misije\gamemodes\Mission10.pwn(420) : error 029: invalid expression, assumed zero
C:\Documents and Settings\mirac\Desktop\Misije\gamemodes\Mission10.pwn(420) : warning 215: expression has no effect
C:\Documents and Settings\mirac\Desktop\Misije\gamemodes\Mission10.pwn(420) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\mirac\Desktop\Misije\gamemodes\Mission10.pwn(420) : fatal error 107: too many error messages on one line

sve greske su na liniji:
PlayerInfo[killerid][Points] += 1;
Neznam kako da to popravim,ako neko zna da pomogne,neka izvoli
ili ako zna neki drugi nacin za rjesavanje problema neka kaze
Neke slike/video za lakse dobivanje pomoci(neobavezno):///

Evo razmisljo sam sta nevalja ... i onda otiso na samp wiki ... i gle oni su napravili +1 a ne += a i mislim da ide i ako tako stavljas =+ ... ako grijesim ispravi me ...

Samp Wiki:
//da doda igracu .... score +1 kad ubje

if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
Datum registracije:    Listopad 21, 2009, 15:56:43
|Rick Dunn| NaNx |Soldier |
|Maper | Web Developer [HTML+CSS] | C++ beginner |

Respect: Karike, Chris, ///Masic, Stormer, Walter, NeNo, Pacino, NaNek

Dakle kada igrac ubije drugog igraca,da dobije jedan poen,koji je nevezan za score
i usput += radi
probavao sam
bio sam napravio ovaj sistem
ali nije samo igrac koji ubije dobijao poen
nego svi igraci na serveru,

EDIT:
ovako sam radio

enum PlayerData
{
Intro,
Points,
};

new PlayerInfo[PlayerData];
public OnPlayerDeath(playerid, killerid, reason)
{

GivePlayerMoney(killerid, 1000);
   SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
PlayerInfo[killerid][Points] += 1;
return 1;
}

i izbaci mi ove errore
C:\Documents and Settings\mirac\Desktop\Misije\gamemodes\Mission10.pwn(420) : warning 213: tag mismatch
C:\Documents and Settings\mirac\Desktop\Misije\gamemodes\Mission10.pwn(420) : warning 215: expression has no effect
C:\Documents and Settings\mirac\Desktop\Misije\gamemodes\Mission10.pwn(420) : error 001: expected token: ";", but found "["
C:\Documents and Settings\mirac\Desktop\Misije\gamemodes\Mission10.pwn(420) : error 029: invalid expression, assumed zero
C:\Documents and Settings\mirac\Desktop\Misije\gamemodes\Mission10.pwn(420) : warning 215: expression has no effect
C:\Documents and Settings\mirac\Desktop\Misije\gamemodes\Mission10.pwn(420) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\mirac\Desktop\Misije\gamemodes\Mission10.pwn(420) : fatal error 107: too many error messages on one line


sta nevalja :S
Ovo SetPlayerScore,to radi,to su oni poeni na tab
ali ovo Points to su nestalni poeni u igri
dakle dok traje jedna mapa
1 kill = 1 poen = novo oruzje
da bi mogao koristiti

         if(PlayerInfo[Points] == 1 )
                {
                ResetPlayerWeapons(playerid);
                GivePlayerWeapon(playerid, 18, 1000);
                GameTextForPlayer(playerid, "Level 1", 2000, 3);
                }

jer ako bi koristio
preko GetPlayerScore ,onda nebi radilo
jer neki igraci imaju
500+ score,
nadam se da sam sad dobro pojasnio
Poslednja Izmena: Septembar 03, 2011, 08:03:52 PRE PODNE od almir101

cek a zasto koristis playerinfo??
msm svrha mu je koja
Datum registracije:    Listopad 21, 2009, 15:56:43
|Rick Dunn| NaNx |Soldier |
|Maper | Web Developer [HTML+CSS] | C++ beginner |

Respect: Karike, Chris, ///Masic, Stormer, Walter, NeNo, Pacino, NaNek

public OnPlayerConnect(playerid)
{
PlayerInfo[Intro] = 1;
return 1;
}


public OnPlayerSpawn(playerid)
{
  if(PlayerInfo[Intro] == 1)
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Objective","Your Mission is to steal money from the {993300}red marker","Ok","");
                PlayerInfo[Intro] = 0;
}
    return 1;
    }

to koristim
a sad hocu i da napravim za te poene
al nezz kako,nece da radi
ako vi znate bolji,laksi nacin i da radi,recite