Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: FilipX poslato Februar 23, 2016, 15:00:17 POSLE PODNE

Naslov: [POMOC] Compile
Poruka od: FilipX poslato Februar 23, 2016, 15:00:17 POSLE PODNE
Skripta koju koristim: Svoju
Detaljan opis problema: Compile error... Ispod imate slike
Dio skripte: Komanda
Neke slike/video za lakse dobivanje pomoci(neobavezno): http://www.igreklik.com/slike/viewer.php?file=38212467258846148880.png&file_imgur=TLhJdbC.png
http://www.igreklik.com/slike/viewer.php?file=95522400162292291204.png&file_imgur=wOUr1nZ.png

EDIT: Imam izdefinisano PlayerInfo, ali dalje isti error
Naslov: Odg: [POMOC] Compile
Poruka od: Drobnjak poslato Februar 23, 2016, 15:06:35 POSLE PODNE
Ne ide ti = 0, nego == 0.
Naslov: Odg: [POMOC] Compile
Poruka od: FilipX poslato Februar 23, 2016, 15:07:32 POSLE PODNE
i dalje isti error :'(
Naslov: Odg: [POMOC] Compile
Poruka od: Drobnjak poslato Februar 23, 2016, 15:09:35 POSLE PODNE
Na istoj liniji isti error ?
Naslov: Odg: [POMOC] Compile
Poruka od: FilipX poslato Februar 23, 2016, 15:10:43 POSLE PODNE
Da
Naslov: Odg: [POMOC] Compile
Poruka od: [CH]Lenon poslato Februar 23, 2016, 15:11:41 POSLE PODNE
Daj copy/paste kod necu prepisivati sa slike.
Naslov: Odg: [POMOC] Compile
Poruka od: FilipX poslato Februar 23, 2016, 15:13:14 POSLE PODNE
public OnPlayerCommandText(playerid, cmdtext[])
{
   if (strcmp("/platikaznu", cmdtext, true, 10) == 0)
   {
   if(PlayerInfo[playerid][Kazna] == 0)
   {
      SendClientMessage(playerid, BLUE, "Nemas nikakvu kaznu!");
      return 1;
   }
   {
   if(PlayerInfo[playerid][Kazna] == 1)
   {
      SendClientMessage(playerid, RED, "Platio si kaznu!");
      GivePlayerMoney(playerid,-350);
      return 1;
   }
   return 0;
}
Naslov: Odg: [POMOC] Compile
Poruka od: Drobnjak poslato Februar 23, 2016, 15:14:00 POSLE PODNE
Ne razumijem se bas dobro u strcmp, ali zasto ce ti u strcmp komandi na kraju == 0 ?
Naslov: Odg: [POMOC] Compile
Poruka od: [CH]Lenon poslato Februar 23, 2016, 15:14:32 POSLE PODNE

public OnPlayerCommandText(playerid, cmdtext[])
{
   if (strcmp("/platikaznu", cmdtext, true, 10) == 0)
   {
   if(PlayerInfo[playerid][Kazna] == 0)
   {
      SendClientMessage(playerid, BLUE, "Nemas nikakvu kaznu!");
      return 1;
   }
   if(PlayerInfo[playerid][Kazna] == 1)
   {
      SendClientMessage(playerid, RED, "Platio si kaznu!");
      GivePlayerMoney(playerid,-350);
      return 1;
   }
   }
   return 0;
}
Naslov: Odg: [POMOC] Compile
Poruka od: FilipX poslato Februar 23, 2016, 15:16:02 POSLE PODNE
Lenon, i dalje isti error na isti liniji... :-X
Naslov: Odg: [POMOC] Compile
Poruka od: Drobnjak poslato Februar 23, 2016, 15:17:41 POSLE PODNE
public OnPlayerCommandText(playerid, cmdtext[])
{
   if (strcmp("/platikaznu", cmdtext, true, 10)
   {
   if(PlayerInfo[playerid][Kazna] == 0)
   {
      SendClientMessage(playerid, BLUE, "Nemas nikakvu kaznu!");
      return 1;
   }
   if(PlayerInfo[playerid][Kazna] == 1)
   {
      SendClientMessage(playerid, RED, "Platio si kaznu!");
      GivePlayerMoney(playerid,-350);
      return 1;
   }
   }
   return 0;
}

Probaj tako
Naslov: Odg: [POMOC] Compile
Poruka od: [CH]Lenon poslato Februar 23, 2016, 15:20:34 POSLE PODNE
Ili probaj ovako:


public OnPlayerCommandText(playerid, cmdtext[])
{
  if(!strcmp("/platikaznu", cmdtext))
   {
   if(PlayerInfo[playerid][Kazna] == 0)
   {
      SendClientMessage(playerid, BLUE, "Nemas nikakvu kaznu!");
      return 1;
   }
   if(PlayerInfo[playerid][Kazna] == 1)
   {
      SendClientMessage(playerid, RED, "Platio si kaznu!");
      GivePlayerMoney(playerid,-350);
      return 1;
   }
   }
   return 0;
}
Naslov: Odg: [POMOC] Compile
Poruka od: FilipX poslato Februar 23, 2016, 17:27:27 POSLE PODNE
Opet isti error.  :(
Naslov: Odg: [POMOC] Compile
Poruka od: Letic poslato Februar 23, 2016, 19:50:20 POSLE PODNE
Nemas definisan PlayerInfo enum, nije do strcmp-a, definisi PI.
Naslov: Odg: [POMOC] Compile
Poruka od: FilipX poslato Februar 23, 2016, 21:22:16 POSLE PODNE
Mr Letic, imam
Naslov: Odg: [POMOC] Compile
Poruka od: Letic poslato Februar 23, 2016, 21:51:22 POSLE PODNE
Ako se imalo razumes u skriptu znas da ovo znaci da simbol nije definisan: http://prntscr.com/a72vmz