SakaLuX
-
Posts
8 -
Joined
-
Last visited
Content Type
Profiles
Forums
News
Documentation
Posts posted by SakaLuX
-
-
Am reparat mai tot ce mi-a ramas: orele /stats si /check merg dupa ce scrii /quitjob dar acolo o sa ma mai chinui eu pana il rezolv.... getdrugs l-am rezolvat si asta care am postat`o acum... Care ma ajuta Multumesc anticipat!
-
Din pacate de el este vorba momentan am reusit sa refac multe buguri in el.... chiar imi place foarte mult acest gamemode dar nu stiu exact cum sa fixez variabilele si sa repar baza de date.... Daca esti amabil sa ma ajuti ar fi foarte frumos din partea ta! Daca nu o poti face macar da`mi 1 2 exemple si incerc singurel!
-
Problema intalnita (descriere): Primesc erori de genul cand playerii se omoara intre ei si cred ca au legatura cu war-urile sau turfs
Ero(area / rile) / warning-(ul / urile):Spoiler[14:35:08] [debug] Run time error 4: "Array index out of bounds"
[14:35:08] [debug] Accessing element at index 73 past array upper bound 72
[14:35:08] [debug] AMX backtrace:
[14:35:08] [debug] #0 0007b7c0 in public IsPlayerInTurf (playerid=1, turfid=73) at C:\Users\SakaLuX\Downloads\samp\pawno\WhiteCs.pwn:8574
[14:35:08] [debug] #1 000a1994 in public AB_OnPlayerDeath (playerid=1, killerid=65535, reason=255) at C:\Users\SakaLuX\Downloads\samp\pawno\WhiteCs.pwn:11653
[14:35:08] [debug] #2 00024de4 in public fk_OnPlayerDeath (playerid=1, killerid=65535, reason=255) at C:\Users\SakaLuX\Downloads\pawno\include\OPA.inc:71
[14:35:08] [debug] #3 0001d7e0 in public OnPlayerDeath (playerid=1, killerid=65535, reason=255) at C:\Users\SakaLuX\Downloads\samp\pawno\include\OnPlayerFakeKill.inc:47
Liniile de cod / sursa / script-ul(obligatoriu):Asta e 8574 if(x >= TurfInfo[turfid][zMinX] && x < TurfInfo[turfid][zMaxX] && y >= TurfInfo[turfid][zMinY] && y < TurfInfo[turfid][zMaxY])
Spoilerpublic IsPlayerInTurf(playerid, turfid)
{
if(IsPlayerConnected(playerid))
{
if(turfid == -1)
{
return 0;
}
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);
if(x >= TurfInfo[turfid][zMinX] && x < TurfInfo[turfid][zMaxX] && y >= TurfInfo[turfid][zMinY] && y < TurfInfo[turfid][zMaxY])
{
return 1;
}
}
return 0;
}11653 if(IsPlayerInTurf(playerid, i) == 1)
Spoilerpublic OnPlayerDeath(playerid, killerid, reason)
{
Alive[playerid] = 0;
CheckDelay[playerid] = 10;
TextDrawHideForPlayer(playerid, Status[playerid]);
new vehicleid = GetPlayerVehicleID(playerid);
if(vehicleVariables[vehicleid][vVehicleJob] == 7)
{
format(szMessage, sizeof(szMessage), "Job failed.");
SCM(playerid, COLOR_NOB, szMessage);
SetVehicleToRespawnEx(vehicleid);
KillTimer(mowertimer[playerid]);
MowerMoney[playerid] = 0;
TextDrawHideForPlayer(playerid,Mower[playerid]);
playerVariables[playerid][pFarmerMoney] = 0;}
if(PlayerPaintballing[playerid] != 0)
{
foreach(Player, x)
{
if((PlayerPaintballing[playerid] != 0 && PlayerPaintballing[killerid] != 0) && PlayerPaintballing[x])
{
SendDeathMessageToPlayer(x, killerid, playerid, reason);
}
}
new string[500];
new pinfo[128];
KillP[killerid]++;
DeathP[playerid]++;format(string, sizeof(string), "You have killed %s. You now have %d kills.",GetName(playerid), KillP[killerid]);
SendClientMessage(killerid, COLOR_GENANNOUNCE, string);
format(string, sizeof(string), "You have been killed by %s.",GetName(killerid));
SendClientMessage(playerid, COLOR_GENANNOUNCE, string);PlayerPaintballScore[killerid] = KillP[killerid];
if(PlayerPaintballScore[killerid] > PaintballWinnerScore)
{
PaintballWinner = killerid;
PaintballWinnerScore = PlayerPaintballScore[killerid];
foreach(Player,i)
{
if(IsPlayerConnected(i))
{
if(PlayerPaintballing != 0)
{
format(pinfo,sizeof(pinfo),"%s is now in lead with %d kills.",GetName(PaintballWinner),PaintballWinnerScore);
SCM(i, COLOR_YELLOW, pinfo);
}
}
}
}
return 1;
}
KillTimer(mowertimer[playerid]);
if(playerVariables[playerid][pHeadValue] > 0)
{
if(IsPlayerConnected(killerid))
{
if(playerVariables[killerid][pGroup] == 12)
{
if(GoChase[killerid] == playerid)
{
new string[256];
new killer[MAX_PLAYER_NAME];
new name[MAX_PLAYER_NAME];
GetPlayerName(killerid, killer, sizeof(killer));
GetPlayerName(playerid, name, sizeof(name));
playerVariables[killerid][pMoney] += playerVariables[playerid][pHeadValue];
format(string,128,"%s has succesfully completed the contract on %s for $%d, distance: %.0fm.",killer,name,playerVariables[playerid][pHeadValue], GetDistanceBetweenPlayers(killerid, playerid));
SendToGroup(12, COLOR_HIT, string);
playerVariables[playerid][pHeadValue] = -1;
GotHit[playerid] = 0;
GetChased[playerid] = 999;
GoChase[killerid] = 999;
}
}
}
}
new turfkiller, turfplayerid;
for(new i = 0; i <= sizeof(TurfInfo); i++)
{
if(IsPlayerInTurf(playerid, i) == 1)
{
turfplayerid = i;
break;
}
}
for(new i = 0; i <= sizeof(TurfInfo); i++)
{
if(IsPlayerInTurf(killerid, i) == 1)
{
turfkiller = i;
break;
}
}
new string[256];
if(WarInfo[turfplayerid][wTime] > 0 && WarInfo[turfkiller][wTime] > 0)
{
if(turfplayerid == turfkiller)
{
if(playerVariables[playerid][pGroup] == WarInfo[turfplayerid][wAttacker] && playerVariables[killerid][pGroup] == WarInfo[turfplayerid][wFaction])
{
playerVariables[playerid][pWarDeaths] += 1;
format(string, sizeof(string), "You have been killed by %s (%i)", playerVariables[killerid][pNormalName], killerid);
SCM(playerid, COLOR_GENANNOUNCE, string);groupVariables[WarInfo[turfkiller][wFaction]][gScore] += 1;
playerVariables[killerid][pWarScore] += 1;
format(string, sizeof(string), "You have killed %s (%i).", playerVariables[playerid][pNormalName], playerid);
SCM(killerid, COLOR_GENANNOUNCE, string);foreach(Player, x)
{
if(playerVariables[x][pGroup] == WarInfo[turfplayerid][wAttacker] || playerVariables[x][pGroup] == WarInfo[turfplayerid][wFaction])
{
SendDeathMessageToPlayer(x, killerid, playerid, reason);
}
}
SCM(playerid, COLOR_LIGHTBLUE, "You will be spawned in the HQ.");
}
else if(playerVariables[killerid][pGroup] == WarInfo[turfkiller][wAttacker] && playerVariables[playerid][pGroup] == WarInfo[turfkiller][wFaction])
{
playerVariables[playerid][pWarDeaths] += 1;
format(string, sizeof(string), "You have been killed by %s (%i).", playerVariables[killerid][pNormalName], killerid);
SCM(playerid, COLOR_GENANNOUNCE, string);groupVariables[WarInfo[turfplayerid][wAttacker]][gScore] += 1;
playerVariables[killerid][pWarScore] += 1;
format(string, sizeof(string), "You have killed %s (%i).", playerVariables[playerid][pNormalName], playerid);
SCM(killerid, COLOR_GENANNOUNCE, string);foreach(Player, x)
{
if(playerVariables[x][pGroup] == WarInfo[turfplayerid][wAttacker] || playerVariables[x][pGroup] == WarInfo[turfplayerid][wFaction])
{
SendDeathMessageToPlayer(x, killerid, playerid, reason);
}
}
SCM(playerid, COLOR_LIGHTBLUE, "You will be spawned in group HQ.");
}
}
}
if((WarInfo[turfkiller][wTime] != 0 && (WarInfo[turfkiller][wAttacker] == playerVariables[playerid][pGroup] || WarInfo[turfkiller][wFaction] == playerVariables[playerid][pGroup]) && playerVariables[playerid][pGroup] != 0) || (playerVariables[killerid][pGroup] == 1
|| playerVariables[killerid][pGroup] == 2 || playerVariables[killerid][pGroup] == 3 || playerVariables[killerid][pGroup] == 5) || (playerVariables[playerid][pGroup] == 1 || playerVariables[playerid][pGroup] == 2 || playerVariables[playerid][pGroup] == 3 || playerVariables[playerid][pGroup] == 5) || (playerVariables[playerid][pGroup] == playerVariables[killerid][pGroup]) || (PlayerPaintballing[killerid] >= 1))
{
}
else
{
WantedID[playerid] = killerid;
SCM(playerid, COLOR_GENANNOUNCE, "You have been attacked by another player. You have 60 seconds to call the police to report this crime. Use /call 112.");
WantedIDTime[playerid] = 60;
}
//SetTimerEx("Spawn", 3999, 0, "d", playerid);
SetPlayerHealth(playerid, 0);
killerid = INVALID_PLAYER_ID;
return 1;
}71 return 1;
Spoilerpublic OnPlayerDeath(playerid, killerid, reason)
{
g_abLastTick[playerid] = gettime() + 3;#if defined AB_OnPlayerDeath
AB_OnPlayerDeath(playerid, killerid, reason);
#endif
return 1;
}47 return true;
Spoilerpublic OnPlayerDeath(playerid, killerid, reason)
{
if(!IsPlayerNPC(playerid))
{
if(gettime() - StartDeathTick[playerid] < 5) //5 seconds
{
CountDeaths[playerid] ++;
if(CountDeaths[playerid] == 10)
{
CallLocalFunction("OnPlayerFakeKill", "i", playerid);
return CountDeaths[playerid] = 0;
}
}
else CountDeaths[playerid] = 1;
StartDeathTick[playerid] = gettime();
}
#if defined fk_OnPlayerDeath
fk_OnPlayerDeath(playerid, killerid, reason);
#endif
return true;
}M-ai am un bug in care un player intra pe sv joaca 2 minute si in /stats ii apare +100 de ore.... /getmats nu functioneaza... si uneori si /stats nu merge... trebuie sa scrie /quitjob ca sa mearga dinou... Astea le vom rezolva dupa ce terminam cu cele date mai sus!
Imagini / Video (optional):
Ati incercat sa rezolvati singur?: Am incercat sa pun la eroarea 47 In loc de return true sa pun return 1 dar degeaba... si am mai facut schimbari dar tot nu am ajuns la rezolvare... ceea ce vedeti mai sus nu am schimbat nimic ca sa nu fie vreo problema -
Da te rog!
-
Iti multumesc extrem de mult pentru ajutor! Iti multumesc din suflet!
- 1
-
Up*
Nu ma poate ajuta nimeni?
-
[04:23:22] [debug] Run time error 4: "Array index out of bounds"
[04:23:22] [debug] Accessing element at index 612 past array upper bound 611
[04:23:22] [debug] AMX backtrace:
[04:23:22] [debug] #0 0009beec in saveDealer (id=612) at C:\Users\SakaLuX\Downloads\samp\gamemode.pwn:11258
[04:23:22] [debug] #1 001adbb4 in public SaveData () at C:\Users\SakaLuX\Downloads\samp\gamemode.pwn:31283Astea sunt erorile pe care le primesc in server_log.cfg. Urmeaza sa va arat si liniile
saveDealer
format(szLargeString, sizeof(szLargeString), "UPDATE dealer SET stock = '%d', Price = '%d', Pprice = '%d', name = '%s' WHERE carID = '%d'", vehSlots[id],vehPrice[id],vehPprice[id],vehName[id],id);
Asta e linia cu probleme iar mai jos in spoiler aveti tot ce va trebuie!
Spoilerstock saveDealer(const id)
{
format(szLargeString, sizeof(szLargeString), "UPDATE dealer SET stock = '%d', Price = '%d', Pprice = '%d', name = '%s' WHERE carID = '%d'", vehSlots[id],vehPrice[id],vehPprice[id],vehName[id],id);
mysql_tquery(handle,szLargeString);
return 1;
}SaveData
saveDealer(ff);
Asta e linia cu probleme iar mai jos in spoiler aveti tot ce va trebuie!
Spoilerpublic SaveData()
{
foreach(Player, x)
{
savePlayerData(x);
}
for(new xh = 0; xh < MAX_HOUSES; xh++)
{
saveHouse(xh);
}
for(new xf = 0; xf < MAX_GROUPS; xf++)
{
saveGroup(xf);
}
for(new xc = 0; xc < MAX_CLANS; xc++)
{
saveClan(xc);
}
for(new xf = 0; xf < MAX_BUSINESSES; xf++)
{
saveBusiness(xf);
}
for(new xf = 0; xf < MAX_ASSETS; xf++)
{
saveAsset(xf);
}
for(new ff = 0; ff < 613; ff++)
{
saveDealer(ff);
}
}Daca va intereseaza si un log de la mysql aveti mai jos
Spoiler[04:07:00] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[04:07:00] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[04:07:05] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[04:07:05] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[04:07:10] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[04:07:10] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[04:09:58] [ERROR] CMySQLQuery::Execute[] - (error #1065) Query was empty
[04:10:41] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[04:10:41] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[04:10:46] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[04:10:46] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[04:10:52] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
[04:10:52] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('0')
Eroare warr/turf/ore buguite
in Arhivă probleme
Posted
Up careva?