Cancan.1234 1
Cancan.1234
farkmt2official 1
farkmt2official
kralhakan2009 1
kralhakan2009
Vahsi Uzman 1
Vahsi Uzman
Hikaye Ekle

Cevaplanmadı Great offline shop sql

  • Konuyu başlatan Konuyu başlatan 61kaplanlar61
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 12
  • Görüntüleme Görüntüleme 1K

Ayyıldız2 | 2008 TR Yapısı • 1-99 Orta Emek Destan • Oto Avsız • 10 Temmuz 21:00 HEMEN TIKLA!

https://forum.turkmmo.com/konu/3688612-metin2-guncel-great-cevrimdisi-pazar/ bu konudaki sistemi ekliyorum sql dosyaları hata veriyor novaline freebsd 12.2 mysql8 kullanıyorum bide bazı warningler bunlar benim ekleyişimden dolayımı yoksa normali böylemi
char.cpp: In member function 'void CHARACTER::OpenShop(DWORD, const char*, bool)':
char.cpp:1485:29: warning: 'val' may be used uninitialized in this function [-Wmaybe-uninitialized]
1485 | item->SetForceAttribute(at, attr, val);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
char.cpp:1481:12: warning: 'attr' may be used uninitialized in this function [-Wmaybe-uninitialized]
1481 | DWORD attr;
| ^~~~
char.cpp:1477:21: warning: 'soc' may be used uninitialized in this function [-Wmaybe-uninitialized]
1477 | item->SetSocket(s, soc, false);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
In file included from fishing.h:4,
from char.cpp:21:
item.h:15:41: warning: 'id' may be used uninitialized in this function [-Wmaybe-uninitialized]
15 | void SetRealID(DWORD id) { m_dwRealID = id; }
| ~~~~~~~~~~~^~~~
char.cpp:1443:10: note: 'id' was declared here
1443 | DWORD id;
| ^~
char.cpp: In member function 'void CHARACTER::DeleteMyShop()':
char.cpp:1557:5: warning: 'gold' may be used uninitialized in this function [-Wmaybe-uninitialized]
1557 | if (gold > 0)
| ^~
char.cpp: In member function 'void CHARACTER::UpdateShopItems()':
char.cpp:1302:29: warning: 'val' may be used uninitialized in this function [-Wmaybe-uninitialized]
1302 | item->SetForceAttribute(at, attr, val);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
char.cpp:1298:12: warning: 'attr' may be used uninitialized in this function [-Wmaybe-uninitialized]
1298 | DWORD attr;
| ^~~~
char.cpp:1294:21: warning: 'soc' may be used uninitialized in this function [-Wmaybe-uninitialized]
1294 | item->SetSocket(s, soc, false);
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
char.cpp:1280:53: warning: 'id' may be used uninitialized in this function [-Wmaybe-uninitialized]
1280 | LPITEM item = ITEM_MANAGER::instance().CreateItem(shop->vnum, shop->count, id, false, -1, true);
 
Son düzenleme:
item.h a gir


[CODE lang="cpp" title="ara"]#ifdef OFFLINE_SHOP[/CODE]



[CODE lang="cpp" title="bununla değiştir"]#ifdef OFFLINE_SHOP
public:
void SetRealID(DWORD id) { m_dwRealID = id; }
DWORD GetRealID() { return m_dwRealID; }
protected:
DWORD m_dwRealID;
#endif[/CODE]




char.h a gir

[CODE lang="cpp" title="ara"]class CArena;[/CODE]


[CODE title="altındaki #ifdef OFFLINE_SHOP ve GIFT SYSTEM i bununla değiştir"]
#ifdef OFFLINE_SHOP
#include "../../libgame/include/grid.h"
typedef struct SPrivShop
{
DWORD shop_id;
DWORD shop_vid;
char szSign[SHOP_SIGN_MAX_LEN + 1];
BYTE item_count;
BYTE rest_count;
BYTE days;
DWORD date_close;
long long gold;

} TPrivShop;

typedef std::map<DWORD, TPrivShop> PSHOP_MAP;
#endif

#ifdef GIFT_SYSTEM
typedef struct SGiftItem
{
DWORD id;
WORD pos;
#ifdef FULL_YANG
long long count;
#else
DWORD count;
#endif
DWORD vnum;
long alSockets[ITEM_SOCKET_MAX_NUM]; // ??A????Ł

TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_MAX_NUM];
char szFrom[101];
char szReason[101];
DWORD dwDateAdd;
} TGiftItem;
typedef std::map<int, std::vector<TGiftItem> > GIFT_MAP;
#endif
[/CODE]

eğer warning giderse eklemenden dolayı bi hata var
 
Son düzenleme:
warningler pek önemli değil diye biliyorum sql içinde daha önce ken kullandiysan ve greate geçtiysen move_from_ken.sql olani atcan eğer sıfırdan great kurduysan adini unuttum update olan değil diğeri onu attıktan sonra update.sql i atıcaksın eğer duplicate layer diye bi hata verirse update sql zaten yüklenmiş demektir atmana gerek yok
 
boş bi aql databasesine query atınca aldıgım hata
SQL] Query query start
[ERR] 1067 - Invalid default value for 'date'
[ERR]
DROP TABLE IF EXISTS `player_shop`;
CREATE TABLE `player_shop` (
`id` int(255) NOT NULL AUTO_INCREMENT,
`player_id` int(255) NOT NULL,
`shop_vid` int(255) NOT NULL,
`item_count` int(3) NOT NULL DEFAULT '0',
`name` varchar(255) COLLATE utf8_polish_ci NOT NULL,
`status` enum('OK','CLOSED') COLLATE utf8_polish_ci NOT NULL DEFAULT 'OK',
`map_index` int(20) NOT NULL DEFAULT '0',
`x` int(30) NOT NULL DEFAULT '0',
`y` int(30) NOT NULL DEFAULT '0',
`z` int(30) NOT NULL,
`date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`date_close` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`ip` varchar(255) COLLATE utf8_polish_ci NOT NULL DEFAULT '0.0.0.0',
`gold` varchar(255) COLLATE utf8_polish_ci NOT NULL DEFAULT '0',
`cash` int(255) NOT NULL DEFAULT '0',
`channel` int(1) NOT NULL DEFAULT '1',
`edit_mode` int(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`,`shop_vid`)
) ENGINE=MyISAM;

DROP TABLE IF EXISTS `shop_cost`;
CREATE TABLE `shop_cost` (
`id` int(255) NOT NULL AUTO_INCREMENT,
`time` int(255) NOT NULL DEFAULT '0',
`time_type` enum('day','hour','normal_shop') NOT NULL DEFAULT 'day',
`cost` int(255) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=12;

-- ----------------------------
-- Records of shop_cost
-- ----------------------------
INSERT INTO `shop_cost` VALUES ('5', '0', 'normal_shop', '5000000');
INSERT INTO `shop_cost` VALUES ('6', '1', 'hour', '100000');
INSERT INTO `shop_cost` VALUES ('7', '2', 'hour', '500000');
INSERT INTO `shop_cost` VALUES ('8', '3', 'hour', '1000000');
INSERT INTO `shop_cost` VALUES ('9', '1', 'day', '1500000');
INSERT INTO `shop_cost` VALUES ('10', '2', 'day', '2000000');
INSERT INTO `shop_cost` VALUES ('11', '3', 'day', '2500000');


DROP TABLE IF EXISTS `shop_limit`;
CREATE TABLE `shop_limit` (
`channel` int(2) DEFAULT NULL,
`map_index` int(11) DEFAULT NULL,
`shop_limit` varchar(255) DEFAULT NULL
) ENGINE=MyISAM;

DROP TABLE IF EXISTS `player_gift`;
CREATE TABLE `player_gift` (
`id` int(255) NOT NULL AUTO_INCREMENT,
`owner_id` int(255) NOT NULL,
`date_add` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`date_get` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`status` enum('WAIT','OK') COLLATE utf8_polish_ci NOT NULL DEFAULT 'WAIT',
`from` varchar(255) COLLATE utf8_polish_ci NOT NULL DEFAULT '0',
`reason` text COLLATE utf8_polish_ci NOT NULL,
`vnum` int(255) NOT NULL DEFAULT '0',
`count` bigint(255) NOT NULL DEFAULT '1',
`socket0` int(10) unsigned NOT NULL DEFAULT '0',
`socket1` int(10) unsigned NOT NULL DEFAULT '0',
`socket2` int(10) unsigned NOT NULL DEFAULT '0',
`socket3` int(10) unsigned NOT NULL DEFAULT '0',
`socket4` int(10) unsigned NOT NULL DEFAULT '0',
`socket5` int(10) unsigned NOT NULL DEFAULT '0',
`attrtype0` tinyint(4) NOT NULL DEFAULT '0',
`attrvalue0` smallint(6) NOT NULL DEFAULT '0',
`attrtype1` tinyint(4) NOT NULL DEFAULT '0',
`attrvalue1` smallint(6) NOT NULL DEFAULT '0',
`attrtype2` tinyint(4) NOT NULL DEFAULT '0',
`attrvalue2` smallint(6) NOT NULL DEFAULT '0',
`attrtype3` tinyint(4) NOT NULL DEFAULT '0',
`attrvalue3` smallint(6) NOT NULL DEFAULT '0',
`attrtype4` tinyint(4) NOT NULL DEFAULT '0',
`attrvalue4` smallint(6) NOT NULL DEFAULT '0',
`attrtype5` tinyint(4) NOT NULL DEFAULT '0',
`attrvalue5` smallint(6) NOT NULL DEFAULT '0',
`attrtype6` tinyint(4) NOT NULL DEFAULT '0',
`attrvalue6` smallint(6) NOT NULL DEFAULT '0',
`applytype0` tinyint(4) NOT NULL DEFAULT '0',
`applyvalue0` smallint(6) NOT NULL DEFAULT '0',
`applytype1` tinyint(4) NOT NULL DEFAULT '0',
`applyvalue1` smallint(6) NOT NULL DEFAULT '0',
`applytype2` tinyint(4) NOT NULL DEFAULT '0',
`applyvalue2` smallint(6) NOT NULL DEFAULT '0',
`applytype3` int(11) NOT NULL DEFAULT '0',
`applyvalue3` int(11) NOT NULL DEFAULT '0',
`applytype4` int(11) NOT NULL DEFAULT '0',
`applyvalue4` int(11) NOT NULL DEFAULT '0',
`applytype5` int(11) NOT NULL DEFAULT '0',
`apply
[SQL] Finished with error

hiç bir şekilde ne player dosyasına nede başka bi dosyanın içine sql ler atılmıyor hiçbirisi acaba başka bi yeremi atıcam bilmiyorum
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst