29.04.2018, 20:48
Hello guys! I have problem with my houses. When i create house it creates two in base.. http://prntscr.com/jbpzss . I have problem with long line so i create this two functions:
And those functions i put in this one
Here is the OnPropertyCreated
How to fix this??
Код:
forward create_property1(kid); public create_property1(kid) { new query[ 1500 ]; mysql_format(_dbConnector, query, sizeof(query), "INSERT INTO `propertys` (iSQLID,iOwnerSQLID,iOwned,iOwner,iEnter1,iEnter2,iEnter3,iExit1,iExit2,iExit3,iPrice,iLocked,iInterior,iVW,iVrsta, \ iSafeStatus,iOruzje1,iOruzje2,iOruzje3,iOruzje4,iMunicija1,iMunicija2,iMunicija3,iMunicija4) VALUES('%d','%d','%d','%e','%f','%f','%f','%f','%f','%f','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d','%d', '%d')", II[kid][iSQLID],II[kid][iOwnerSQLID],II[kid][iOwned],II[kid][iOwner],II[kid][iEnter][0],II[kid][iEnter][1],II[kid][iEnter][2],II[kid][iExit][0],II[kid][iExit][1], II[kid][iExit][2],II[kid][iPrice],II[kid][iLocked],II[kid][iInterior],II[kid][iVW],II[kid][iVrsta], II[kid][iSafeStatus],II[kid][iOruzje][0],II[kid][iOruzje][1],II[kid][iOruzje][2],II[kid][iOruzje][3],II[kid][iMunicija][0],II[kid][iMunicija][1],II[kid][iMunicija][2],II[kid][iMunicija][3]); mysql_tquery(_dbConnector, query); //mysql_pquery(_dbConnector, query, "OnPropertyCreated", "i", kid); return true; } forward create_property2(kid); public create_property2(kid) { new query[ 1500 ]; mysql_format(_dbConnector, query, sizeof(query), "INSERT INTO `propertys` (iDrugAmmount,iAlarm,iLevel,iAdress,iNeaktivnost,iRentable,iRentPrice,iRentovano,iMats,iMoney) VALUES( '%d','%d','%d','%d','%d','%d','%d','%d','%d','%d')", II[kid][iDrugAmmount],II[kid][iAlarm],II[kid][iLevel],II[kid][iAdress],II[kid][iNeaktivnost], II[kid][iRentable],II[kid][iRentPrice],II[kid][iRentovano],II[kid][iMats],II[kid][iMoney]); mysql_pquery(_dbConnector, query, "OnPropertyCreated", "i", kid); return true; }
Код:
sql_create_property(kid) { create_property1(kid); create_property2(kid); return true; }
Код:
forward OnPropertyCreated(id); public OnPropertyCreated(id) { II[ id ][ iSQLID ] = cache_insert_id(); return true; }