29.11.2013, 15:47
Thanks..
Where can I fix this?
And about crash..
It happens when I run this command:
Public SaveBizz:
Public SaveSBizz
Public SaveCars
Public SaveHouses
Until yesterday was pretending save normally, I can have no idea of what is happening. =//
Where can I fix this?
Quote:
Why have you set the size of the memory (from stack and heap) to 65536 (from #pragma dynamic)?
Make it greater when you get: Run time error 3: "Stack/heap collision (insufficient stack size)" only. And by the way, it'd be 4096 * 2 = result * 2 and go on. |
It happens when I run this command:
pawn Код:
if(strcmp(cmd, "/save", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] > 1342)
{
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1343) { return SendClientMessage(playerid, COLOR_GRAD1, "You dont workink! (/work)"); }
mysql_function_query(Connect, "SELECT * FROM `empresas`", true, "SaveBizz", "");
mysql_function_query(Connect, "SELECT * FROM `sempresas`", true, "SaveSBizz", "");
mysql_function_query(Connect, "SELECT * FROM `veiculos`", true, "SaveCars", "");
mysql_function_query(Connect, "SELECT * FROM `casas`", true, "SaveHouses", "");
SendClientMessage(playerid, -1,"Starting save of, Bizz, Sbizz, Cars and Houses");
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "insufficient Permission!");
}
}
return 1;
}
pawn Код:
public SaveBizz()
{
new rows, fields,TotalBusinesses;
cache_get_data(rows, fields);
while(TotalBusinesses < rows)
{
new Str[315];
format(Str,156,"UPDATE `empresas` SET `Vendida`='%i',`Dono`='%s',`Mensagem`='%s',`Extorcao`='%s',",BizzInfo[TotalBusinesses][bOwned],BizzInfo[TotalBusinesses][bOwner],BizzInfo[TotalBusinesses][bMessage],BizzInfo[TotalBusinesses][bExtortion]);
format(Str,315,"%s`LevelNecessario`='%i',`PrecoCompra`='%i',`EntradaCusto`='%i',`Till`='%i',`Trancada`='%i' WHERE `ID`='%i'",Str,BizzInfo[TotalBusinesses][bLevelNeeded],BizzInfo[TotalBusinesses][bBuyPrice],BizzInfo[TotalBusinesses][bEntranceCost],BizzInfo[TotalBusinesses][bTill],BizzInfo[TotalBusinesses][bLocked],TotalBusinesses);
mysql_function_query(Connect, Str, false, "","");
//print("");
//print(Str);
TotalBusinesses++;
}
printf("[BVS]: %d Bizz Save",TotalBusinesses);
return 1;
}
pawn Код:
public SaveSBizz()
{
new rows, fields,TotalSBusinesses;
cache_get_data(rows, fields);
while(TotalSBusinesses < rows)
{
new Str[317];
format(Str,133,"UPDATE `sempresas` SET `Dono`='%s',`Mensagen`='%s',`Extorcao`='%s',",SBizzInfo[TotalSBusinesses][sbOwner], SBizzInfo[TotalSBusinesses][sbMessage], SBizzInfo[TotalSBusinesses][sbExtortion]);
format(Str,317,"%s`LevelNecessario`='%i',`PrecoCompra`='%i',`EntradaCusto`='%i',`Till`='%i',`Trancada`='%i',`Comprada`='%i' WHERE `ID`='%i'",Str,SBizzInfo[TotalSBusinesses][sbLevelNeeded],SBizzInfo[TotalSBusinesses][sbBuyPrice]
,SBizzInfo[TotalSBusinesses][sbEntranceCost],SBizzInfo[TotalSBusinesses][sbTill],SBizzInfo[TotalSBusinesses][sbLocked],SBizzInfo[TotalSBusinesses][sbOwned],TotalSBusinesses);
mysql_function_query(Connect, Str, false, "","");
//print("");
//print(Str);
TotalSBusinesses++;
}
printf("[BVS]: %d SBizz save",TotalSBusinesses);
return 1;
}
pawn Код:
public SaveCars()
{
new rows, fields,TotalCars;
cache_get_data(rows, fields);
while(TotalCars < rows)
{
new Str[435];
//UPDATE `veiculos` SET `Modelo`='%i',`Cor1`='value-8',`Cor2`='value-9',`Dono`='value-10',`Descricao`='value-11',`Valor`='value-12',`Vendido`='value-15',`Trancado`='value-16',`owv`='value-17',`LX`='value-18',`LY`='value-19',`LZ`='value-20',`LA`='value-21',`Grana`='value-22',`IPVATime`='value-24',`IPVA`='value-25',`Plate`='value-26' WHERE 1
format(Str,185,"UPDATE `veiculos` SET `Modelo`='%i',`Cor1`='%i',`Cor2`='%i',`Dono`='%s',`Descricao`='%s',`Valor`='%i',",CarInfo[TotalCars][cModel],CarInfo[TotalCars][cColorOne],
CarInfo[TotalCars][cColorTwo],CarInfo[TotalCars][cOwner],CarInfo[TotalCars][cDescription],CarInfo[TotalCars][cValue]);
format(Str,310,"%s`Vendido`='%i',`Trancado`='%i',`LX`='%f',`LY`='%f',`LZ`='%f',`LA`='%f',",Str,CarInfo[TotalCars][cOwned],CarInfo[TotalCars][cLock],
CarInfo[TotalCars][lx],CarInfo[TotalCars][ly],CarInfo[TotalCars][lz],CarInfo[TotalCars][langle]);
format(Str,435,"%s`Grana`='%i',`IPVATime`='%i',`IPVA`='%i',`Plate`='%s' WHERE `cID`='%i'",Str,CarInfo[TotalCars][cGrana],CarInfo[TotalCars][cIPVATime],CarInfo[TotalCars][cIPVA],
CarInfo[TotalCars][cPlate],CarInfo[TotalCars][cID]);
mysql_function_query(Connect, Str, false, "","");
//print("");
//print(Str);
TotalCars++;
}
printf("[BVS]: %d Carros Salvos", TotalCars);
return 1;
}
pawn Код:
public SaveHouses()
{
new rows, fields,TotalCasas;
cache_get_data(rows, fields);
while(TotalCasas < rows)
{
new Str[603];
format(Str,163,"UPDATE `casas` SET `HealthX`='%i',`HealthY`='%i',`HealthZ`='%i',`ArmorrX`='%i',`ArmorrY`='%i',`ArmorrZ`='%i',",HouseInfo[TotalCasas][hHealthx],
HouseInfo[TotalCasas][hHealthy],HouseInfo[TotalCasas][hHealthz],HouseInfo[TotalCasas][hArmorrx],HouseInfo[TotalCasas][hArmorry],HouseInfo[TotalCasas][hArmorrz]);
format(Str,380,"%s`Dono`='%s',`Descricao`='%s',`Valor`='%i',`Saude`='%i',`Colete`='%i',`Interior`='%i',`Trancado`='%i',`Vendido`='%i',",Str,HouseInfo[TotalCasas][hOwner],
HouseInfo[TotalCasas][hDiscription],HouseInfo[TotalCasas][hValue],HouseInfo[TotalCasas][hHel],HouseInfo[TotalCasas][hArm],HouseInfo[TotalCasas][hInt],HouseInfo[TotalCasas][hLock],HouseInfo[TotalCasas][hOwned]);
format(Str,557,"%s`Rooms`='%i',`Rent`='%i',`Rentabil`='%i',`Takings`='%i',`Vec`='%i',`Vcol1`='%i',`Vcol2`='%i',`Data`='%i',",Str,HouseInfo[TotalCasas][hRooms],HouseInfo[TotalCasas][hRent],
HouseInfo[TotalCasas][hRentabil],HouseInfo[TotalCasas][hTakings],HouseInfo[TotalCasas][hVec],HouseInfo[TotalCasas][hVcol1],HouseInfo[TotalCasas][hVcol2],HouseInfo[TotalCasas][hDate]);
format(Str,603,"%s`Level`='%i' WHERE `ID`='%i'",Str,HouseInfo[TotalCasas][hLevel],TotalCasas);
mysql_function_query(Connect, Str, false, "","");
//print("");
//print(Str);
TotalCasas++;
}
printf("[BVS]: %d Houses Save",TotalCasas);
return 1;
}