Skripta koju koristim: LB
Detaljan opis problema: Pokazuje mi error na bezveze liniji.
Dio skripte:
(21550) : error 029: invalid expression, assumed zero
if(strcmp(cmd, "/heal", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerToPoint(3, playerid,1173.2563,-1323.3102,15.3943)||PlayerToPoint(3, playerid,2029.5945,-1404.6426,17.2512))
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, COLOR_BOLNICA, "BOLNICA: UspjeÅ¡no ste se izljeÄili - usluge su bile besplatne.");
else
{
SendClientMessage(playerid, COLOR_GREY, "Nemožete koristiti ovu komandu - niste dovoljno blizu bolnice.");
}
}
return 1;
}
Na else mi izbacuje error, problem je ova linija else, ali kada uklonim poruku od BOLNICA: ne izbacuje error. Pomoć.
Neke slike/video za lakse dobivanje pomoci(neobavezno): /
if(strcmp(cmd, "/heal", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerToPoint(3, playerid,1173.2563,-1323.3102,15.3943)||PlayerToPoint(3, playerid,2029.5945,-1404.6426,17.2512))
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, COLOR_GREY, "BOLNICA: UspjeÅ¡no ste se izljeÄili - usluge su bile besplatne.");
else
{
SendClientMessage(playerid, COLOR_GREY, "Nemožete koristiti ovu komandu - niste dovoljno blizu bolnice.");
}
}
return 1;
}
Da ÄitaÅ¡ možda bi znao - Na else mi izbacuje error
Isti error.
mesto else dodaj return
Else je ako ne pošalje poruku ovu od BOLNICA, i da 100hp. Kakvu ulogu ima return, stavio sam pa izbaci error.
Evo sredio sam umjesto else stavio return 1; dole drugi return 2; i stavio po još jednu {}. Može LOCK.Hvala još jednom.
Niss :)
Citat: ѕαdιη. poslato Maj 29, 2012, 16:11:48 POSLE PODNE
Evo sredio sam umjesto else stavio return 1; dole drugi return 2; i stavio po još jednu {}. Može LOCK.Hvala još jednom.
jujuju sta uradi :P
if(strcmp(cmd, "/heal", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerToPoint(3, playerid,1173.2563,-1323.3102,15.3943)||PlayerToPoint(3, playerid,2029.5945,-1404.6426,17.2512))
{
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, COLOR_GREY, "BOLNICA: Uspješno ste se izljecili - usluge su bile besplatne.");
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Nemožete koristiti ovu komandu - niste dovoljno blizu bolnice.");
}
}
return 1;
}
eo ti komanda radi 100% :D
Ovo što sam ja uradio neradi IG, hmm, ako moze da ne LOCK-ate temu još. Sad cu probati ovaj tvoj kod da vidim.
ok, ovo sto sam ti dao treba raditi :D
Citat: [E:RP] Danijel96.pwn poslato Maj 29, 2012, 17:07:51 POSLE PODNE
Citat: ѕαdιη. poslato Maj 29, 2012, 16:11:48 POSLE PODNE
Evo sredio sam umjesto else stavio return 1; dole drugi return 2; i stavio po još jednu {}. Može LOCK.Hvala još jednom.
jujuju sta uradi :P
if(strcmp(cmd, "/heal", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerToPoint(3, playerid,1173.2563,-1323.3102,15.3943)||PlayerToPoint(3, playerid,2029.5945,-1404.6426,17.2512))
{
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, COLOR_GREY, "BOLNICA: Uspješno ste se izljecili - usluge su bile besplatne.");
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Nemožete koristiti ovu komandu - niste dovoljno blizu bolnice.");
}
}
return 1;
}
eo ti komanda radi 100% :D
Too, hvala puno radi, šta si uradio ?.
np, javi mi se na pm ako nekad bude trebala pomoc
zaboravio si {
Oću, budi siguran :D, sad može LOCK.