Problem(error/warning):
43235) : error 033: array must be indexed (variable "PrihvatioZahtev")
(43240) : error 033: array must be indexed (variable "PrihvatioZahtev")
(60848) : error 033: array must be indexed (variable "PrihvatioZahtev")
Dio skripte:fDialog(2115)
{
if( response )
{
SCM(playerid, -1, ""SRWBOJA"NK:RPG "BELA"Prihvatili ste zahtjev za goto!");
PlayerInfo[playerid][PrihvatioZahtev] = 1; ////////////////////////////////////////OVDE IZBACUJE ERRORRR:::
}
else
{
SCM(playerid, -1, ""SRWBOJA"NK:RPG "BELA"Odbili ste zahtev za goto!");
PlayerInfo[playerid][PrihvatioZahtev] = 0;////////////////////////////////////////OVDE IZBACUJE ERRORRR:::
}
}
forward ZahtevZaGoto(playerid);
public ZahtevZaGoto(playerid)
{
new Float:plx,Float:ply,Float:plz;
new string[265], giveplayerid, giveplayer[MAX_PLAYER_NAME];
if(PlayerInfo[giveplayerid][PrihvatioZahtev] == 1) ////////////////////////////////////////OVDE IZBACUJE ERRORRR:::
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerPos(giveplayerid, plx, ply, plz);
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plx, ply+4, plz);
}
else
{
SetPlayerPos(playerid,plx,ply+2, plz);
}
SetPlayerInterior(playerid, GetPlayerInterior(giveplayerid));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(giveplayerid));
format(string, sizeof(string),""srvboja"[PORT] "BELA"Portao si se do igraca %s.",GetName(giveplayerid));
SCM(playerid, -1, string);
new arank[124];
if(PlayerInfo[playerid][pAdmin] == 1) { arank = "Admin Level 1"; }
else if(PlayerInfo[playerid][pAdmin] == 2) { arank = "Admin Level 2"; }
else if(PlayerInfo[playerid][pAdmin] == 3) { arank = "Admin Level 3"; }
else if(PlayerInfo[playerid][pAdmin] == 4) { arank = "Admin Level 4"; }
else if(PlayerInfo[playerid][pAdmin] == 5) { arank = "Admin Level 5 (Head-Admin)"; }
else if(PlayerInfo[playerid][pVlasnik] == 1) { arank = "Vlasnik"; }
else if(PlayerInfo[playerid][pAdmin] == 6) { arank = "Vlasnik"; }
else if(PlayerInfo[playerid][pGM] == 1) { arank = "GameMaster Level 1"; }
else if(PlayerInfo[playerid][pGM] == 2) { arank = "GameMaster Level 2"; }
else if(PlayerInfo[playerid][pGM] == 3) { arank = "GameMaster Level 3"; }
else if(PlayerInfo[playerid][pImunitet] == 1) { arank = "Spec Team"; }
format(string, sizeof(string),""srvboja"[PORT] "BELA"%s %s se portao do vas.",arank, GetName( playerid ) );
SCM(giveplayerid, -1, string);
}
return 1;
}
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log)://
PrihvatioZahtev mora bit indexovan, posalji new PrihvatioZahtev
al pre toga probaj PrihvatioZahtev[playerid] umesto PrihvatioZahtev
EDIT: Ovo je enum, al svakako probaj ovo sa [playerid]
Ovako treba da ide...
[pawn]forward ZahtevZaGoto(playerid);
public ZahtevZaGoto(playerid)
{
new Float:plx,Float:ply,Float:plz;
new string[265], giveplayerid, giveplayer[MAX_PLAYER_NAME];
if(PlayerInfo[giveplayerid][pPrihvatioZahtev] == 1)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerPos(giveplayerid, plx, ply, plz);
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plx, ply+4, plz);
}
else
{
SetPlayerPos(playerid,plx,ply+2, plz);
}
SetPlayerInterior(playerid, GetPlayerInterior(giveplayerid));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(giveplayerid));
format(string, sizeof(string),""ZUTA"[PORT] "BELA"Portao si se do igraca %s.",GetName(giveplayerid));
SCM(playerid, -1, string);
new arank[124];
if(PlayerInfo[playerid][pAdmin] == 1) { arank = "Admin Level 1"; }
else if(PlayerInfo[playerid][pAdmin] == 2) { arank = "Admin Level 2"; }
else if(PlayerInfo[playerid][pAdmin] == 3) { arank = "Admin Level 3"; }
else if(PlayerInfo[playerid][pAdmin] == 4) { arank = "Admin Level 4"; }
else if(PlayerInfo[playerid][pAdmin] == 5) { arank = "Admin Level 5 (Head-Admin)"; }
else if(PlayerInfo[playerid][pVlasnik] == 1) { arank = "Vlasnik"; }
else if(PlayerInfo[playerid][pAdmin] == 6) { arank = "Admin Level 6 (Direktor)"; }
else if(PlayerInfo[playerid][pGM] == 1) { arank = "GameMaster Level 1"; }
else if(PlayerInfo[playerid][pGM] == 2) { arank = "GameMaster Level 2"; }
else if(PlayerInfo[playerid][pGM] == 3) { arank = "GameMaster Level 3"; }
else if(PlayerInfo[playerid][pImunitet] == 1) { arank = "Spec Team"; }
else if(PlayerInfo[playerid][pVip] == 1) { arank = "Vip Level 1"; }
else if(PlayerInfo[playerid][pVip] == 2) { arank = "Vip Level 2"; }
else if(PlayerInfo[playerid][pVip] == 3) { arank = "Vip Level 3"; }
else if(PlayerInfo[playerid][pVip] == 4) { arank = "Vip Level 4"; }
else if(PlayerInfo[playerid][pVip] == 5) { arank = "Premium"; }
format(string, sizeof(string),""ZUTA"[PORT] "BELA"%s %s se portao do vas.",arank, GetName( playerid ) );
SCM(giveplayerid, -1, string);
}
return 1;
}[/pawn]
[pawn]fDialog(2115)
{
if( response )
{
SCM(playerid, -1, ""SRWBOJA"[BP:RPG] "BELA"Prihvatili ste zahtjev za goto!");
PlayerInfo[playerid][pPrihvatioZahtev] = 1;
}
else
{
SCM(playerid, -1, ""SRWBOJA"[BP:RPG] "BELA"Odbili ste zahtev za goto!");
PlayerInfo[playerid][pPrihvatioZahtev] = 0;
}
}[/pawn]
I pod enum pInfo staviš pPrihvatioZahtev, ili ako si stavio na kraju enum pInfo onda stavis pPrihvatioZahtev
Fala ti puno imamovicu ! <3 wolim te