- 0
problema id la ds
-
Similar Content
-
- 1 answer
- 237 views
-
- 3 answers
- 355 views
-
- 3 replies
- 403 views
-
- 1 reply
- 353 views
-
- 1 answer
- 203 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
testX
Problema intalnita (descriere): Sall all, am facut un alt sistem de Dealership, doar ca am o mica problema, tinand cont de ideea lui Maurice de la rg3 care este o idee buna pentru spawnarea/despawnarea vehiculului indiferent ca creem niste masini cu /veh si dupa rr dispar si nu se incurca id-urile lor intre ele, am facut si eu chestia asta si merge perfect inafara de functia de incarcare a lor, in svr log imi tot zice ca id este egal cu 0 si imi da crash la consola, problema este de la updatarea masinii spawnate si nuh cum sa o rezolv
Ero(area / rile) / warning-(ul / urile): nu imi da erori in gm, dar in svr log da
Liniile de cod / sursa / script-ul(obligatoriu):
Server Log:
---------- Loaded log file: "server_log.txt". ---------- SA-MP Dedicated Server ---------------------- v0.3.7-R2, (C)2005-2015 SA-MP Team [23:29:57] filterscripts = "" (string) [23:29:57] password = "" (string) [23:29:57] [23:29:57] Server Plugins [23:29:57] -------------- [23:29:57] Loading plugin: crashdetect [23:29:57] CrashDetect v4.15.1 is OK. [23:29:57] Loaded. [23:29:57] Loading plugin: sscanf [23:29:57] [23:29:57] =============================== [23:29:57] sscanf plugin loaded. [23:29:57] Version: 2.8.1 [23:29:57] (c) 2012 Alex "Y_Less" Cole [23:29:57] =============================== [23:29:57] Loaded. [23:29:57] Loading plugin: streamer [23:29:57] *** Streamer Plugin v2.7.7 by Incognito loaded *** [23:29:57] Loaded. [23:29:57] Loading plugin: mysql [23:29:57] >> plugin.mysql: R39-2 successfully loaded. [23:29:57] Loaded. [23:29:57] Loading plugin: wp [23:29:57] [23:29:57] ================== [23:29:57] [23:29:57] Whirlpool loaded [23:29:57] [23:29:57] ================== [23:29:57] [23:29:57] Loaded. [23:29:57] Loaded 5 plugins. [23:29:57] [23:29:57] Ban list [23:29:57] -------- [23:29:57] Loaded: samp.ban [23:29:57] [23:29:57] [23:29:57] Filterscripts [23:29:57] --------------- [23:29:57] Loaded 0 filterscripts. [23:29:57] MatsShopInfo: 0 materials. [23:29:57] IRC:0 Admin: MOTD: Password: NeedPass: 0 Lock: 0 [23:29:57] IRC:1 Admin: MOTD: Password: NeedPass: 0 Lock: 0 [23:29:57] IRC:2 Admin: MOTD: Password: NeedPass: 0 Lock: 0 [23:29:57] IRC:3 Admin: MOTD: Password: NeedPass: 0 Lock: 0 [23:29:57] IRC:4 Admin: MOTD: Password: NeedPass: 0 Lock: 0 [23:29:57] IRC:5 Admin: MOTD: Password: NeedPass: 0 Lock: 0 [23:29:57] IRC:6 Admin: MOTD: Password: NeedPass: 0 Lock: 0 [23:29:57] IRC:7 Admin: MOTD: Password: NeedPass: 0 Lock: 0 [23:29:57] IRC:8 Admin: MOTD: Password: NeedPass: 0 Lock: 0 [23:29:57] IRC:9 Admin: MOTD: Password: NeedPass: 0 Lock: 0 [23:29:57] CK:0 Taken: 0 Sendername: Giveplayer: [23:29:57] CK:1 Taken: 0 Sendername: Giveplayer: [23:29:57] CK:2 Taken: 0 Sendername: Giveplayer: [23:29:57] CK:3 Taken: 0 Sendername: Giveplayer: [23:29:57] CK:4 Taken: 0 Sendername: Giveplayer: [23:29:57] CK:5 Taken: 0 Sendername: Giveplayer: [23:29:57] CK:6 Taken: 0 Sendername: Giveplayer: [23:29:57] CK:7 Taken: 0 Sendername: Giveplayer: [23:29:57] CK:8 Taken: 0 Sendername: Giveplayer: [23:29:57] CK:9 Taken: 0 Sendername: Giveplayer: [23:29:57] ---------------- [23:29:57] 0 papers loaded [23:29:57] ---------------- [23:29:57] TextDraw-uri incarcate [23:29:57] ---------------------- [23:29:57] Current Pickups = 522 [23:29:57] ----------------------- [23:29:57] main() has been called. [23:29:57] ----------------------- [23:29:57] Number of vehicle models: 103 [23:29:57] ----------------------------------------------------------- [23:29:57] [Incarcare] 'LoadGangZone' | Incarcate 132 teritorii in 4 ms. [23:29:57] ----------------------------------------------------------- [23:29:57] [Incarcare] 'LoadMafiaZone' | Incarcate 46 teritorii in 2 ms. [23:29:57] -------------------------------------------- [23:29:57] [Incarcare] 'Clanuri' | Incarcate: 4 clanuri. [23:29:57] -------------------------------------------- [23:29:57] [debug] Server crashed while executing gf.amx [23:29:57] [debug] AMX backtrace: [23:29:57] [debug] #0 native mysql_format () from mysql.DLL [23:29:57] [debug] #1 00019188 in public LoadVehs (id=0) at E:\GM-uri\GMM\gamemodes\gf.pwn:3176 [23:29:57] [debug] Native backtrace: [23:29:57] [debug] #0 54aafe89 in ?? () from plugins\mysql.DLL [23:29:57] [debug] #1 004010b6 in ?? () from samp-server.exe [23:29:57] [debug] #2 54cc62ca in ?? () from plugins\crashdetect.DLL [23:29:57] [debug] #3 54cc8b28 in ?? () from plugins\crashdetect.DLL [23:29:57] [debug] #4 54cc09c7 in ?? () from plugins\crashdetect.DLL [23:29:57] [debug] #5 54cc631a in ?? () from plugins\crashdetect.DLL [23:29:57] [debug] #6 54c551b9 in ?? () from plugins\streamer.DLL [23:29:57] [debug] #7 004829f8 in ?? () from samp-server.exe [23:29:57] [debug] #8 0049124a in ?? () from samp-server.exe
Functia LoadVehs()
function LoadVehs(id) { new Cache: r = mysql_query( mysql_db, "SELECT * FROM `vehprop`" ); if( !cache_get_row_count( mysql_db ) ) return cache_delete( r ), print( "Nu ai niciun vehicul in baza de date [ table vehprop ]." ); for( new i = 0; i < cache_get_row_count( mysql_db ); i++ ) { new cveh = C_D[id][cSpawned], string[256]; C_D[id][cSQL] = cache_get_field_content_int( i, "sqlid", mysql_db ); C_D[id][cPos][0] = cache_get_field_content_float( i, "PosX", mysql_db ); C_D[id][cPos][1] = cache_get_field_content_float( i, "PosY", mysql_db ); C_D[id][cPos][2] = cache_get_field_content_float( i, "PosZ", mysql_db ); C_D[id][cPos][3] = cache_get_field_content_float( i, "PosA", mysql_db ); C_D[id][cOwned] = cache_get_field_content_int( i, "Owned", mysql_db ); cache_get_field_content( i, "Owner", C_D[id][cOwner], mysql_db, MAX_PLAYER_NAME ); cache_get_field_content( i, "Plate", C_D[id][cPlate], mysql_db, MAX_PLAYER_NAME ); C_D[id][cModel] = cache_get_field_content_int( i, "Model", mysql_db ); C_D[id][cPrice] = cache_get_field_content_int( i, "Price", mysql_db ); C_D[id][cLock] = cache_get_field_content_int( i, "Locked", mysql_db ); C_D[id][cDays] = cache_get_field_content_int( i, "Days", mysql_db ); C_D[id][cKM] = cache_get_field_content_float( i, "KM", mysql_db ); C_D[id][cPP] = cache_get_field_content_int( i, "PP", mysql_db ); C_D[id][cColor][0] = cache_get_field_content_int( i, "Color1", mysql_db ); C_D[id][cColor][1] = cache_get_field_content_int( i, "Color2", mysql_db ); C_D[id][cSpawned] = cache_get_field_content_int( i, "Spawned", mysql_db ); C_D[id][cPaint] = cache_get_field_content_int( i, "PaintID", mysql_db ); C_D[id][cInsurance] = cache_get_field_content_int( i, "Insurance", mysql_db ); new szFieldName[8]; for(new j = 0; j != 14; ++j) { format(szFieldName, 8, "Mod%d", j); C_D[id][cMods][j] = cache_get_field_content_int(i, szFieldName, mysql_db); } if(C_D[id][cSpawned] != 0) { C_D[id][cSpawned] = CreateVehicle(C_D[id][cModel], C_D[id][cPos][0], C_D[id][cPos][1], C_D[id][cPos][2], C_D[id][cPos][3], C_D[id][cColor][0], C_D[id][cColor][1], -1); for ( new j = 0; j != 14; ++j ) { if ( C_D [ cveh ] [ cMods ] [ j ] == 0 ) continue; AddVehicleComponent ( cveh, C_D [ cveh ] [ cMods ] [ j ] ); } SetVehicleNumberPlate(cveh, C_D[id][cPlate]); SetVehicleToRespawn(id); mysql_format(mysql_db, string, sizeof(string), "UPDATE vehprop SET Spawned='%d' WHERE sqlid=%d", C_D[id][cSpawned], id); mysql_tquery(mysql_db, string); } } cache_delete( r ); return 1; }
Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: am incercat prin punerea de:
new temp = cache_num_rows();
if(temp == 0)
{
C_D[id][cSQL] = -2;
}
cum e la LoadCars la el si degeaba
Link to comment
Share on other sites
2 answers to this question
Recommended Posts