[POMOC]Komanda

Započeo OptX, Avgust 29, 2011, 11:42:57 PRE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

OptX

Skripta koju koristim: Noxicus
Detaljan opis problema: Dodao sam komandu /heal i dobio errore: C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26250) : error 017: undefined symbol "igrac"
C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26251) : warning 219: local variable "pos" shadows a variable at a preceding level
C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26252) : error 017: undefined symbol "igrac"
C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26252) : warning 215: expression has no effect
C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26252) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26252) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26252) : fatal error 107: too many error messages on one line

Dio skripte: CMD:heal(playerid,params[])
{
    if(PlayerInfo[playerid][pMember] >=4 || PlayerInfo[playerid][pLeader] == 4)
    {
if(!sscanf(params, "ui", igrac,cena)) return SendClientMessage(playerid, -1, "Uputstvo: /heal [IgracevID] [Cijena]");
new Float:pos[3];
GetPlayerPos(igrac,pos[0],pos[1],pos[2]);
if(!IsPlayerInRangeOfPoint(playerid,4.0,pos[0],pos[1],pos[3]); return SendClientMessage(playerid, -1, "Niste blizu tog igraca"); //Proverava da li je blizu tog igrac
SetPlayerHealth(igrac,100);
GivePlayerMoney(igrac, -cena);
GivePlayerMoney(playerid, cena);
SendClientMessage(playerid,0xE01B4C,"Izlijecili ste drugog igraca");
}
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):/

 if(!sscanf(params, "ui", igrac,cena)) return SendClientMessage(playerid, -1, "Uputstvo: /heal [IgracevID] [Cijena]"); 
zamjeni ovako
if(!sscanf(params, "ui",playerid,cena)) return SendClientMessage(playerid, -1, "Uputstvo: /heal [IgracevID] [Cijena]"); 
mislim da je ovako ..



Citat: OptX poslato Avgust 29, 2011, 11:42:57 PRE PODNE
Skripta koju koristim: Noxicus
Detaljan opis problema: Dodao sam komandu /heal i dobio errore: C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26250) : error 017: undefined symbol "igrac"
C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26251) : warning 219: local variable "pos" shadows a variable at a preceding level
C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26252) : error 017: undefined symbol "igrac"
C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26252) : warning 215: expression has no effect
C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26252) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26252) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26252) : fatal error 107: too many error messages on one line

Dio skripte: CMD:heal(playerid,params[])
{
    if(PlayerInfo[playerid][pMember] >=4 || PlayerInfo[playerid][pLeader] == 4)
    {
if(!sscanf(params, "ui", igrac,cena)) return SendClientMessage(playerid, -1, "Uputstvo: /heal [IgracevID] [Cijena]");
new Float:pos[3];
GetPlayerPos(igrac,pos[0],pos[1],pos[2]);
if(!IsPlayerInRangeOfPoint(playerid,4.0,pos[0],pos[1],pos[3]); return SendClientMessage(playerid, -1, "Niste blizu tog igraca"); //Proverava da li je blizu tog igrac
SetPlayerHealth(igrac,100);
GivePlayerMoney(igrac, -cena);
GivePlayerMoney(playerid, cena);
SendClientMessage(playerid,0xE01B4C,"Izlijecili ste drugog igraca");
}
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):/



stavi ovako:

CMD:heal(playerid,params[]) 
   { 
new igrac;
       if(PlayerInfo[playerid][pMember] >=4 || PlayerInfo[playerid][pLeader] == 4) 
       { 
   if(!sscanf(params, "ui", igrac,cena)) return SendClientMessage(playerid, -1, "Uputstvo: /heal [IgracevID] [Cijena]"); 
   new Float:pos[3]; 
   GetPlayerPos(igrac,pos[0],pos[1],pos[2]); 
   if(!IsPlayerInRangeOfPoint(playerid,4.0,pos[0],pos[1],pos[3]); return SendClientMessage(playerid, -1, "Niste blizu tog igraca"); //Proverava da li je blizu tog igrac 
   SetPlayerHealth(igrac,100); 
   GivePlayerMoney(igrac, -cena); 
   GivePlayerMoney(playerid, cena); 
      SendClientMessage(playerid,0xE01B4C,"Izlijecili ste drugog igraca"); 
      } 
   } 
Vratio sam se ponovo ocekjute novi server...

OptX

Citat: [BUL] Cile poslato Avgust 29, 2011, 11:53:26 PRE PODNE
if(!sscanf(params, "ui", igrac,cena)) return SendClientMessage(playerid, -1, "Uputstvo: /heal [IgracevID] [Cijena]");  
zamjeni ovako
if(!sscanf(params, "ui",playerid,cena)) return SendClientMessage(playerid, -1, "Uputstvo: /heal [IgracevID] [Cijena]");  
mislim da je ovako ..

Stavio sam opet isto. Mozes mi napraviti komandu /heal za noxicus plssssssss :'(

Citat: Narco_VK poslato Avgust 29, 2011, 11:57:10 PRE PODNE
Citat: OptX poslato Avgust 29, 2011, 11:42:57 PRE PODNE
Skripta koju koristim: Noxicus
Detaljan opis problema: Dodao sam komandu /heal i dobio errore: C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26250) : error 017: undefined symbol "igrac"
C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26251) : warning 219: local variable "pos" shadows a variable at a preceding level
C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26252) : error 017: undefined symbol "igrac"
C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26252) : warning 215: expression has no effect
C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26252) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26252) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26252) : fatal error 107: too many error messages on one line

Dio skripte: CMD:heal(playerid,params[])
{
    if(PlayerInfo[playerid][pMember] >=4 || PlayerInfo[playerid][pLeader] == 4)
    {
if(!sscanf(params, "ui", igrac,cena)) return SendClientMessage(playerid, -1, "Uputstvo: /heal [IgracevID] [Cijena]");
new Float:pos[3];
GetPlayerPos(igrac,pos[0],pos[1],pos[2]);
if(!IsPlayerInRangeOfPoint(playerid,4.0,pos[0],pos[1],pos[3]); return SendClientMessage(playerid, -1, "Niste blizu tog igraca"); //Proverava da li je blizu tog igrac
SetPlayerHealth(igrac,100);
GivePlayerMoney(igrac, -cena);
GivePlayerMoney(playerid, cena);
SendClientMessage(playerid,0xE01B4C,"Izlijecili ste drugog igraca");
}
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):/



stavi ovako:

CMD:heal(playerid,params[]) 
   { 
new igrac;
       if(PlayerInfo[playerid][pMember] >=4 || PlayerInfo[playerid][pLeader] == 4) 
       { 
   if(!sscanf(params, "ui", igrac,cena)) return SendClientMessage(playerid, -1, "Uputstvo: /heal [IgracevID] [Cijena]"); 
   new Float:pos[3]; 
   GetPlayerPos(igrac,pos[0],pos[1],pos[2]); 
   if(!IsPlayerInRangeOfPoint(playerid,4.0,pos[0],pos[1],pos[3]); return SendClientMessage(playerid, -1, "Niste blizu tog igraca"); //Proverava da li je blizu tog igrac 
   SetPlayerHealth(igrac,100); 
   GivePlayerMoney(igrac, -cena); 
   GivePlayerMoney(playerid, cena); 
      SendClientMessage(playerid,0xE01B4C,"Izlijecili ste drugog igraca"); 
      } 
   } 


Dobio sam ove errore:

C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26251) : error 017: undefined symbol "cena"
C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26252) : warning 219: local variable "pos" shadows a variable at a preceding level
C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26253) : error 028: invalid subscript (not an array or too many subscripts): "pos"
C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26253) : warning 215: expression has no effect
C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26253) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26253) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Alen\Desktop\Balkan Ex\gamemodes\RLRP.pwn(26253) : fatal error 107: too many error messages on one line
Poslednja Izmena: Avgust 29, 2011, 12:00:26 POSLE PODNE od OptX

ovaj prvi error znaci da kod tebe nije definirano tako za oduzimnaje novca... pogledaj u noxixusu i onda rpomiejni...
2. error znaci da si to vec dva puta definirao samo obrisi taj red..