Mysql problem
#1

Hello every one im facting a problem. when i create an entrance in my server it show's the ID Like this

But on the DB i see id 0 so like that all entrances are commited that is bugged these are the codes
PHP код:
forward OnAdminCreateEntrance(playeridentranceidname[], Float:xFloat:yFloat:zFloat:angle);
public 
OnAdminCreateEntrance(playeridentranceidname[], Float:xFloat:yFloat:zFloat:angle)
{
    
strcpy(EntranceInfo[entranceid][eOwner], "Nobody"MAX_PLAYER_NAME);
    
strcpy(EntranceInfo[entranceid][eName], name40);
    
strcpy(EntranceInfo[entranceid][ePassword], "None"64);
    
EntranceInfo[entranceid][eExists] = 1;
    
EntranceInfo[entranceid][eID] = cache_insert_id(connectionID);
    
EntranceInfo[entranceid][eOwnerID] = 0;
    
EntranceInfo[entranceid][eIcon] = 1239;
    
EntranceInfo[entranceid][eLocked] = 0;
    
EntranceInfo[entranceid][eRadius] = 3.0;
    
EntranceInfo[entranceid][ePosX] = x;
    
EntranceInfo[entranceid][ePosY] = y;
    
EntranceInfo[entranceid][ePosZ] = z;
    
EntranceInfo[entranceid][ePosA] = angle;
    
EntranceInfo[entranceid][eIntX] = 0.0;
    
EntranceInfo[entranceid][eIntY] = 0.0;
    
EntranceInfo[entranceid][eIntZ] = 0.0;
    
EntranceInfo[entranceid][eIntA] = 0.0;
    
EntranceInfo[entranceid][eInterior] = 0;
    
EntranceInfo[entranceid][eWorld] = EntranceInfo[entranceid][eID] + 4000000;
    
EntranceInfo[entranceid][eOutsideInt] = GetPlayerInterior(playerid);
    
EntranceInfo[entranceid][eOutsideVW] = GetPlayerVirtualWorld(playerid);
    
EntranceInfo[entranceid][eAdminLevel] = 0;
    
EntranceInfo[entranceid][eFactionType] = FACTION_NONE;
    
EntranceInfo[entranceid][eGang] = -1;
    
EntranceInfo[entranceid][eVIP] = 0;
    
EntranceInfo[entranceid][eVehicles] = 0;
    
EntranceInfo[entranceid][eFreeze] = 0;
    
EntranceInfo[entranceid][eLabel] = 1;
    
EntranceInfo[entranceid][eType] = 0;
    
EntranceInfo[entranceid][eMapIcon] = 0;
    
EntranceInfo[entranceid][eText] = Text3D:INVALID_3DTEXT_ID;
    
EntranceInfo[entranceid][ePickup] = -1;
    
EntranceInfo[entranceid][eMapIconID] = -1;
    
EntranceInfo[entranceid][eColor] = -256;
    
Iter_Add(Entranceentranceid);
    
mysql_format(connectionIDqueryBuffersizeof(queryBuffer), "UPDATE entrances SET world = %i WHERE id = %i"EntranceInfo[entranceid][eWorld], EntranceInfo[entranceid][eID]);
    
mysql_tquery(connectionIDqueryBuffer);
    
ReloadEntrance(entranceid);
    
SendClientMessageEx(playeridCOLOR_GREEN"** Entrance %i created successfully."entranceid);

And this the entrances mysql input
PHP код:
CREATE TABLE `entrances` (
  `
idint(10NOT NULL,
  `
owneridint(10) DEFAULT '0',
  `
ownervarchar(24) DEFAULT NULL,
  `
namevarchar(40) DEFAULT NULL,
  `
iconidsmallint(5) DEFAULT '1239',
  `
lockedtinyint(1) DEFAULT '0',
  `
radiusfloat DEFAULT '3',
  `
pos_xfloat DEFAULT '0',
  `
pos_yfloat DEFAULT '0',
  `
pos_zfloat DEFAULT '0',
  `
pos_afloat DEFAULT '0',
  `
int_xfloat DEFAULT '0',
  `
int_yfloat DEFAULT '0',
  `
int_zfloat DEFAULT '0',
  `
int_afloat DEFAULT '0',
  `
interiortinyint(2) DEFAULT '0',
  `
worldint(10) DEFAULT '0',
  `
outsideinttinyint(2) DEFAULT '0',
  `
outsidevwint(10) DEFAULT '0',
  `
adminleveltinyint(2) DEFAULT '0',
  `
factiontypetinyint(2) DEFAULT '0',
  `
viptinyint(2) DEFAULT '0',
  `
vehiclestinyint(1) DEFAULT '0',
  `
freezetinyint(1) DEFAULT '0',
  `
passwordvarchar(64) DEFAULT 'None',
  `
labeltinyint(1) DEFAULT '1',
  `
mapicontinyint(3NOT NULL DEFAULT '0',
  `
gangtinyint(2) DEFAULT '-1',
  `
typetinyint(2) DEFAULT '0',
  `
colorint(10) DEFAULT '-256'
ENGINE=InnoDB DEFAULT CHARSET=latin1
Even if i create another entrance the ID 0 and the bug the interiors are commited
Reply


Messages In This Thread
[Sloved]Mysql problem - by ScottMcBean - 21.04.2018, 16:50
Re: Mysql problem - by JesterlJoker - 21.04.2018, 16:57
Re: Mysql problem - by ScottMcBean - 21.04.2018, 16:59
Re: Mysql problem - by JesterlJoker - 21.04.2018, 17:08
Re: Mysql problem - by ScottMcBean - 21.04.2018, 17:11
Re: Mysql problem - by JesterlJoker - 21.04.2018, 17:27
Re: Mysql problem - by ScottMcBean - 21.04.2018, 17:30
Re: Mysql problem - by JesterlJoker - 21.04.2018, 17:33
Re: Mysql problem - by ScottMcBean - 21.04.2018, 17:44
Re: Mysql problem - by JesterlJoker - 21.04.2018, 17:49

Forum Jump:


Users browsing this thread: 1 Guest(s)