Peršokti į turinį
  • ŽAIDIMAI
  • , ŽAIDIMAI
  • ŽAIDIMAI

Dėl Connection Handler


Ši tema yra neaktyvi. Paskutinis pranešimas šioje temoje buvo prieš 3234 dienas (-ų). Patariame sukurti naują temą, o ne rašyti naują pranešimą.

Už neaktyvių temų prikėlimą galite sulaukti įspėjimo ir pranešimo pašalinimo!

Recommended Posts

 error 017: undefined symbol "Connection_Handler"

bandžiau new Connection_Handler, bet meta error'a, apie mano include'intą failą. Nes tame faile šitų pilna yra, o pagrindiniame mode meta errora.

 

jei parašau new Connection_Handler, tada mes error:

warning 219: local variable "Connection_Handler" shadows a variable at a preceding level
eilutė: 63    stock LoadHouses(Connection_Handler)
Redaguota , nario REKLAMERIS5
Nuoroda į komentarą
Dalintis per kitą puslapį

(redaguota)

oo veikia, viskas ok namą sukuria duombazeje, su kaina ir t.t. viska ka padariau, bet 

stock AddHouse(duomb,HousePrice,InteriorID,Float:EntranceX,Float:EntranceY,Float:EntranceZ)
{
new slot = GetFreeHouseArraySlot(),query[150];
if(slot == -1)
{
print("[ERROR]Pasiektas namų limitas. Ištrinkite senus arba padidinkite \"MAX_HOUSES\".");
return 0;
}
Houses[slot][Price] = HousePrice;
Houses[slot][ExX] = HouseInteriors[InteriorID][XX];
Houses[slot][ExY] = HouseInteriors[InteriorID][YY];
Houses[slot][ExZ] = HouseInteriors[InteriorID][YY];
Houses[slot][Inter] = HouseInteriors[InteriorID][Inte];
Houses[slot][EnX] = EntranceX;
Houses[slot][EnY] = EntranceY;
Houses[slot][EnZ] = EntranceZ;
format(query,sizeof(query),"Namas parduodamas\nKaina:%d",Houses[slot][Price]);
Houses[slot][Label] = Create3DTextLabel(query,LABEL_COLOR,Houses[slot][EnX],Houses[slot][EnY],Houses[slot][EnZ],15.0,0,1);
format(query,sizeof(query),"INSERT INTO houses (EnX,EnY,EnZ,Inter,ExX,ExY,ExZ,Price)VALUES(%f,%f,%f,%d,%f,%f,%f,%d)",
Houses[slot][EnX],Houses[slot][EnY],Houses[slot][EnZ],Houses[slot][Inter],Houses[slot][ExX],
Houses[slot][ExY],Houses[slot][ExZ],Houses[slot][Price]);
mysql_function_query(duomb,query,true,"OnHouseAdd","i",slot);
return 1;
}

bet nerasos namas parduodamas ar pns, o Owner pas mane ne 0, ten tuščia.

Redaguota , nario REKLAMERIS5
Nuoroda į komentarą
Dalintis per kitą puslapį

15:45:38] [DEBUG] mysql_connect - host: "localhost", user: "root", database: "driftgm", password: "****", port: 3306, autoreconnect: true, pool_size: 2
[15:45:38] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[15:45:38] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[15:45:38] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[15:45:38] [DEBUG] CMySQLHandle::Create - creating new connection..
[15:45:38] [WARNING] CMySQLHandle::Create - connection already exists
[15:45:38] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[15:45:38] [DEBUG] CMySQLConnection::Connect - connection was successful
[15:45:38] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[15:45:38] [DEBUG] CMySQLConnection::Connect - connection was successful
[15:45:38] [DEBUG] CMySQLConnection::Connect - connection was successful
[15:45:38] [DEBUG] CMySQLConnection::Connect - connection was successful
[15:45:38] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[15:45:38] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[15:45:38] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[15:45:38] [DEBUG] CMySQLQuery::Execute[OnHouseAdd] - starting query execution
[15:45:38] [DEBUG] mysql_errno - connection: 1
[15:45:38] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[15:45:38] [DEBUG] CMySQLConnection::Connect - connection was successful
[15:45:38] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[15:45:38] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[15:45:38] [DEBUG] CMySQLConnection::Connect - connection was successful
[15:45:38] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[15:45:38] [DEBUG] CMySQLQuery::Execute[OnHouseAdd] - query was successfully executed within 72.141 milliseconds
[15:45:38] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[15:45:38] [DEBUG] CMySQLQuery::Execute[OnHouseLoad] - starting query execution
[15:45:38] [DEBUG] CMySQLQuery::Execute[OnHouseLoad] - query was successfully executed within 0.485 milliseconds
[15:45:38] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[15:45:38] [DEBUG] Calling callback "OnHouseAdd"..
[15:45:38] [DEBUG] cache_insert_id - connection: 1
[15:45:38] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[15:45:38] [DEBUG] Calling callback "OnHouseLoad"..
[15:45:38] [DEBUG] cache_get_data - connection: 1
[15:45:38] [DEBUG] cache_get_row - row: 0, field_idx: 0, connection: 1, max_len: 32
[15:45:38] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '0', data: "0"
[15:45:38] [DEBUG] cache_get_row - row: 0, field_idx: 1, connection: 1, max_len: 32
[15:45:38] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '1', data: ""
[15:45:38] [DEBUG] cache_get_row - row: 0, field_idx: 2, connection: 1, max_len: 32
[15:45:38] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '2', data: "268.701"
[15:45:38] [DEBUG] cache_get_row - row: 0, field_idx: 3, connection: 1, max_len: 32
[15:45:38] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '3', data: "1452.48"
[15:45:38] [DEBUG] cache_get_row - row: 0, field_idx: 4, connection: 1, max_len: 32
[15:45:38] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '4', data: "75.3346"
[15:45:38] [DEBUG] cache_get_row - row: 0, field_idx: 5, connection: 1, max_len: 32
[15:45:38] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '5', data: "9"
[15:45:38] [DEBUG] cache_get_row - row: 0, field_idx: 6, connection: 1, max_len: 32
[15:45:38] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '6', data: "2251.85"
[15:45:38] [DEBUG] cache_get_row - row: 0, field_idx: 7, connection: 1, max_len: 32
[15:45:38] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '7', data: "-1138.16"
[15:45:38] [DEBUG] cache_get_row - row: 0, field_idx: 8, connection: 1, max_len: 32
[15:45:38] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '8', data: "-1138.16"
[15:45:38] [DEBUG] cache_get_row - row: 0, field_idx: 9, connection: 1, max_len: 32
[15:45:38] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '9', data: "50"
[15:45:38] [DEBUG] cache_get_row - row: 0, field_idx: 10, connection: 1, max_len: 32
[15:45:38] [DEBUG] CMySQLResult::GetRowData - row: '0', field: '10', data: "0"
[15:45:38] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[15:45:38] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[15:45:38] [DEBUG] CMySQLConnection::Connect - connection was successful
[15:45:38] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled

ten prie password ko tie **** nežinau, nes neturiu slaptažodžio..

 

o koordinates nusistačiau su /save namas, tada pasiėmiau jas ir įdėjau kaip EnY .... o ExY.. tai interjero tie duomenys.

Nuoroda į komentarą
Dalintis per kitą puslapį

(redaguota)

pagaliau išėjo, bet ne visai.. aš buvau AddHouse(...) tik vieną padaręs ir nieko nerašė, tada sukūriau 2 namus ir vieną rodė (tą antrą), o pirmo nerodo, nežinau kodėl, o tas HouseId, neidėja, o visą laiką lieka 0.. čia temą sukūrės, gal dėl to bėda?

http://www.supergames.lt/topic/222938-d%C4%97l-mysql-insert-id/

 

pas tave mysql_insert_id, o man kadangi metė error'ą dėl mysql, pakeičiau į cache ir viskas ok, bet vistiek nedidėja tas HouseId..

Redaguota , nario White`
Nuoroda į komentarą
Dalintis per kitą puslapį

Ši tema yra neaktyvi. Paskutinis pranešimas šioje temoje buvo prieš 3234 dienas (-ų). Patariame sukurti naują temą, o ne rašyti naują pranešimą.

Už neaktyvių temų prikėlimą galite sulaukti įspėjimo ir pranešimo pašalinimo!

Prisijungti prie diskusijos

Palikti atsakymą galite iš karto, o užsiregistruoti vėliau. Jeigu jau turite paskyrą mūsų forume, Prisijunkite.

Svečias
Atsakyti šioje temoje...

×   Įklijuotas tekstas turi teksto formatavimą.   Pašalinti teksto formatavimą

  Galimi tik 75 veidukai.

×   Nuoroda buvo automatiškai įterpta.   Įterpti nuorodą paprastai

×   Jūsų ankstesnis pranešimas buvo atkurtas.   Išvalyti redaktorių

×   Jūs negalite įkelti nuotraukas tiesiogiai.Įkelkite arba įdėkite nuotraukas iš URL.

  • Šiame puslapyje naršo:   0 nariai

    • Nėra registruotų narių peržiūrinčių šį forumą.

Skelbimai


×
×
  • Sukurti naują...