Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Header size: 13860 bytes
Code size: 2797976 bytes
Data size: 3727200 bytes
Stack/heap size: 262144 bytes; estimated max. usage: unknown, due to recursion
Total requirements: 6801180 bytes
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Header size: 13860 bytes
Code size: 3560156 bytes
Data size: 3727200 bytes
Stack/heap size: 262144 bytes; estimated max. usage: unknown, due to recursion
Total requirements: 7563360 bytes
----------
Loaded log file: "server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3x, (C)2005-2013 SA-MP Team
[14:07:51] filterscripts = "" (string)
[14:07:51]
[14:07:51] Server Plugins
[14:07:51] --------------
[14:07:51] Loading plugin: streamer
[14:07:51]
*** Streamer Plugin v2.6.1 by Incognito loaded ***
[14:07:51] Loaded.
[14:07:51] Loading plugin: mysql
[14:07:51]
> MySQL plugin R7 successfully loaded.
[14:07:51] Loaded.
[14:07:51] Loading plugin: crashdetect
[14:07:51] CrashDetect v4.12 is OK.
[14:07:51] Loaded.
[14:07:51] Loaded 3 plugins.
[14:07:52]
[14:07:52] Filterscripts
[14:07:52] ---------------
[14:07:52] Loaded 0 filterscripts.
[14:07:53] Carregou 0 cofres
[14:07:53] Carregou 1 cofres
[14:07:53] Carregou 2 cofres
[14:07:53] Carregou 3 cofres
[14:07:53] Carregou 4 cofres
[14:07:53] Carregou 5 cofres
[14:07:53] Carregou 6 cofres
[14:07:53] Carregou 7 cofres
[14:07:53] Carregou 8 cofres
[14:07:54] Carregou 9 cofres
[14:07:54] Carregou 10 cofres
[14:07:54] Carregou 11 cofres
[14:07:54] Carregou 12 cofres
[14:07:54] Carregou 13 cofres
[14:07:54] Carregou 14 cofres
[14:07:54] Carregou 15 cofres
[14:07:54] Carregou 16 cofres
[14:07:54] Carregou 17 cofres
[14:07:54] Carregou 18 cofres
[14:07:54] Carregou 19 cofres
[14:07:54] Carregou 20 cofres
[14:07:54] Carregou 21 cofres
[14:07:54] Carregou 22 cofres
[14:07:54] Carregou 23 cofres
[14:07:54] Carregou 24 cofres
[14:07:54] Carregou 25 cofres
[14:07:54] Carregou 26 cofres
[14:07:54] Carregou 27 cofres
[14:07:54]
---------------------------------------------------------
[14:07:54] Server Ligado: [29/11/2013 14:07:54]
[14:07:54] ---------------------------------------------------------
[14:07:54] -----------------------------
[14:07:54] *** GM - BVL RPG Iniciado ***
[14:07:54] -----------------------------
[14:07:55] 28 Orgs Carregadas
[14:07:55] [MORRO] Dono do Morro = 0
[14:07:55] Sistema de Helper Carregado! Vagas: 16
[14:07:55]
[14:07:55]
[14:07:55] Brasil Street Vision
[14:07:55]
[14:07:55] Number of vehicle models: 89
[14:07:55] [BVS]: 241 Casas Carregadas
[14:07:56] [BVS]: 7 Empresas carregadas
[14:07:57] [BVS]: 22 SEmpresas carregadas
[14:07:57] [BVS]: 129 Carros Carregados
[14:08:26] Incoming connection: 127.0.0.1:49983
[14:08:26] [join] iryston has joined the server (0:127.0.0.1)
[14:08:38] iryston Entrou no [BVL]
//I ran the command to the rescue: Bizz, Sbizz, Cars and houses in mysql
[14:09:04] [BVS]: 7 Bizz Save
[14:09:04] [BVS]: 22 SBizz Save
//Was to show, save cars. Houses save.
[14:09:04] [debug] Server crashed due to an unknown error
[14:09:05] [debug] Native backtrace:
[14:09:05] [debug] #0 7737e3be in ?? () from C:\Windows\SysWOW64\ntdll.dll
[14:09:05] [debug] #1 7737e023 in ?? () from C:\Windows\SysWOW64\ntdll.dll
[14:09:05] [debug] #2 769c14ad in ?? () from C:\Windows\syswow64\kernel32.dll
[14:09:05] [debug] #3 720d3c1b in ?? () from C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\MSVCR90.dll
[14:09:05] [debug] #4 1000a217 in ?? () from K:\plugins\mysql.DLL
[14:09:05] [debug] #5 00469046 in ?? () from K:\samp-server.exe
[14:09:05] [debug] #6 00488afd in ?? () from K:\samp-server.exe
[14:09:05] [debug] #7 00495151 in ?? () from K:\samp-server.exe
[14:09:05] [debug] #8 00495161 in ?? () from K:\samp-server.exe
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. |
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;
}
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;
}
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;
}
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;
}
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;
}
// global:
new
empresas_rows,
sempresas_rows,
veiculos_rows,
casas_rows
;
// You load Bizz:
cache_get_data(rows, fields);
empresas_rows = rows;
// Let's say you load Bizz:
cache_get_data(rows, fields);
empresas_rows = rows;
// You load SBizz:
cache_get_data(rows, fields);
sempresas_rows = rows;
// You load Cars:
cache_get_data(rows, fields);
veiculos_rows = rows;
// You load Houses:
cache_get_data(rows, fields);
casas_rows = rows;
// OnPlayerCommandText:
if(strcmp(cmd, "/saveall", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] <= 1342) SendClientMessage(playerid, COLOR_GRAD1, "insufficient Permission!");
{
if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1343) return SendClientMessage(playerid, COLOR_GRAD1, "You dont workink! (/work)");
SaveBizz();
SaveSBizz();
SaveCars();
SaveHouses();
SendClientMessage(playerid, -1,"Starting save of, Bizz, Sbizz, Cars and Houses");
}
return 1;
}
stock SaveBizz()
{
new Str[315];
for(new TotalBusinesses; TotalBusinesses != empresas_rows; TotalBusinesses++)
{
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);
}
printf("[BVS]: %d Bizz Save", empresas_rows);
}
stock SaveSBizz()
{
new Str[317];
for(new TotalSBusinesses; TotalSBusinesses != sempresas_rows; TotalSBusinesses++)
{
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);
}
printf("[BVS]: %d SBizz save", sempresas_rows);
}
stock SaveCars()
{
new Str[435];
for(new TotalCars; TotalCars != veiculos_rows; TotalCars++)
{
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);
}
printf("[BVS]: %d Carros Salvos", veiculos_rows);
}
stock SaveHouses()
{
new Str[603];
for(new TotalCasas; TotalCasas != casas_rows; TotalCasas++)
{
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);
}
printf("[BVS]: %d Houses Save",casas_rows);
}