[C#]The Arcane Development Thread

10/24/2010 16:24 Miki Maus#76
Quote:
Unhandled Exception: System.OverflowException: Value was either too large or too
small for an unsigned byte.
at System.Convert.ToByte(Int32 value)
at System.Convert.ToByte(Double value)
at Game.File.FileLoad.ItemDatabase(String path)
at Game.File.FileLoad.Load()
at GameServer.Program.Main(String[] args)
Wdf is this gameserver error? :D

offering full db for this.. the one i released is still not complete :D
10/24/2010 16:25 moldi#77
Quote:
Originally Posted by moldi View Post
who know what i must type in "users" table?

EDIT: I got this error when i start gameserver.exe [Only registered and activated users can see links. Click Here To Register...]
up .
10/24/2010 16:28 kevin_owner#78
@Miki Maus those errors mean that you have wrong data types in your database

and @ modli i think that error has something to do with the config files but i'm not sure.

btw, I got a server list at the moment and i'm now busy with the login stuff.
10/24/2010 16:40 Miki Maus#79
PHP Code:
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[char_items]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[char_items]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[hotkeys]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[hotkeys]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[karakterler]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[karakterler]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[news]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[news]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[saved_skills]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[saved_skills]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[server]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[server]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[serverlar]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[serverlar]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[users]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[users]
GO

CREATE TABLE 
[dbo].[char_items] (
    [
owner] [varchar] (50) COLLATE Turkish_CI_AS NULL ,
    [
itemnumber] [int] NULL ,
    [
quantity] [int] NULL ,
    [
itemid] [int] NULL ,
    [
type] [int] NULL ,
    [
slot] [int] NULL ,
    [
inavatar] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE 
[dbo].[hotkeys] (
    [
id] [int] IDENTITY (1, 1) NOT NULL ,
    [
owner] [varchar] (15) COLLATE Turkish_CI_AS NOT NULL ,
    [
slot] [int] NOT NULL ,
    [
type] [int] NOT NULL ,
    [
hotkeyid] [int] NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE 
[dbo].[karakterler] (
    [
id] [int] IDENTITY (1, 1) NOT NULL ,
    [
account] [varchar] (20) COLLATE Turkish_CI_AS NULL ,
    [
name] [varchar] (45) COLLATE Turkish_CI_AS NULL ,
    [
chartype] [int] NULL ,
    [
volume] [int] NULL ,
    [
level] [int] NULL ,
    [
strength] [int] NULL ,
    [
intelligence] [int] NULL ,
    [
attribute] [int] NULL ,
    [
hp] [int] NULL ,
    [
mp] [int] NULL ,
    [
s_hp] [int] NULL ,
    [
s_mp] [int] NULL ,
    [
gold] [int] NULL ,
    [
experience] [int] NULL ,
    [
sp] [int] NULL ,
    [
gm] [int] NULL ,
    [
xsect] [int] NULL ,
    [
ysect] [int] NULL ,
    [
xpos] [int] NULL ,
    [
ypos] [int] NULL ,
    [
zpos] [int] NULL ,
    [
min_phyatk] [int] NULL ,
    [
max_phyatk] [int] NULL ,
    [
min_magatk] [int] NULL ,
    [
max_magatk] [int] NULL ,
    [
phydef] [int] NULL ,
    [
magdef] [int] NULL ,
    [
hit] [int] NULL ,
    [
parry] [int] NULL ,
    [
walkspeed] [int] NULL ,
    [
runspeed] [int] NULL ,
    [
berserkspeed] [int] NULL ,
    [
berserkbar] [int] NULL ,
    [
skillpointbar] [int] NULL ,
    [
berserking] [int] NULL ,
    [
pvp] [int] NULL ,
    [
maxitemslot] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE 
[dbo].[news] (
    [
head] [char] (10) COLLATE Turkish_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE 
[dbo].[saved_skills] (
    [
owner] [varchar] (50) COLLATE Turkish_CI_AS NULL ,
    [
AmountSkill] [int] NULL ,
    [
Skill] [varchar] (50) COLLATE Turkish_CI_AS NULL ,
    [
skillid] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE 
[dbo].[server] (
    [
id] [int] NOT NULL ,
    [
serverid] [int] NOT NULL ,
    [
name] [varchar] (50) COLLATE Turkish_CI_AS NOT NULL ,
    [
users_current] [int] NOT NULL ,
    [
users_max] [int] NOT NULL ,
    [
state] [int] NOT NULL ,
    [
ip] [varchar] (50) COLLATE Turkish_CI_AS NOT NULL ,
    [
port] [int] NOT NULL ,
    [
status] [int] NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE 
[dbo].[serverlar] (
    [
serverid] [int] NULL ,
    [
name] [char] (16) COLLATE Turkish_CI_AS NULL ,
    [
user_current] [char] (10) COLLATE Turkish_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE 
[dbo].[users] (
    [
id] [int] IDENTITY (1, 1) NOT NULL ,
    [
username] [varchar] (20) COLLATE Turkish_CI_AS NULL ,
    [
password] [varchar] (20) COLLATE Turkish_CI_AS NULL ,
    [
blocked] [bit] NULL ,
    [
connected] [bit] NULL ,
    [
online] [char] (10) COLLATE Turkish_CI_AS NULL 
) ON [PRIMARY]
GO 
Cry noobs, need to fix some kind of values there.. that's my version of db..
10/24/2010 16:47 CraYu#80
@Miki Maus
There is no hotkeys, serverlar table :P this tables are there:

Quote:
char_items
karakterler
users
mastery
saved_skills
server
news
storage_items
10/24/2010 16:49 kevin_owner#81
Indeed and use smallint and tinyint data types to solve some problems at least i'd to use those types
10/24/2010 17:00 Miki Maus#82
Quote:
Originally Posted by HeavyLegend View Post
@Miki Maus
There is no hotkeys, serverlar table :P this tables are there:
well i didnt create this db alone, i kinda just completed it lmao, part of it is created by that turk guy..

Btw could u try to fix up the db?
10/24/2010 17:09 kevin_owner#83
@Miki Maus
My server table looks like this
[Only registered and activated users can see links. Click Here To Register...]

this works for me.
btw i have no idea what the first column does but it works
10/24/2010 17:33 Miki Maus#84
Quote:
Originally Posted by kevin_owner View Post
@Miki Maus
My server table looks like this
[Only registered and activated users can see links. Click Here To Register...]

this works for me.
btw i have no idea what the first column does but it works
well thanks for this, now just need to get done the other ones -.-
10/24/2010 18:09 moldi#85
What is the data type of online column from users table?
10/24/2010 18:13 CraYu#86
Fixed the "news" table...

[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]
10/24/2010 18:15 moldi#87
Quote:
Originally Posted by HeavyLegend View Post
Fixed the "news" table...

[Only registered and activated users can see links. Click Here To Register...]
show me u`r 'users' table please.
10/24/2010 18:24 kevin_owner#88
I don't know if this will help but this is my users table:

[Only registered and activated users can see links. Click Here To Register...]

This isn't correct and it returns an error when it checks if the user is banned and if there already is an connection.

but this might help some people.

btw id = username. so not a numeric id.
10/24/2010 22:26 ruancarlosbr#89
usuários
0 -> Int32 AccountID
1 -> seqüência de nome de usuário
2 -> string Senha
3 -> byte Banido
4 -> Obter bytes online
6 -> Silk Int32
7 -> Gold Int64



servidor
1 -> ID Int16
String Nome> - 2
3 - users_current>?
4 -> Int16 maxplayers
5 -> Byte Estado
6 -> String IP
7 -> Porta Int16
8 -> Tipo Byte (???)
10/24/2010 22:34 kevin_owner#90
Quote:
Originally Posted by ruancarlosbr View Post
usuários
0 -> Int32 AccountID
1 -> seqüência de nome de usuário
2 -> string Senha
3 -> byte Banido
4 -> Obter bytes online
6 -> Silk Int32
7 -> Gold Int64



servidor
1 -> ID Int16
String Nome> - 2
3 - users_current>?
4 -> Int16 maxplayers
5 -> Byte Estado
6 -> String IP
7 -> Porta Int16
8 -> Tipo Byte (???)
that's right.
i've the same thing. the only thing what happend to me is an error that there is already an sqlreader thingy open so i'd to make that checkcrowd function comment(which isn't a big deal cuz a few lines after that check it checks again if the server is crowed) but the only problem i have is C9 xD and my ports are all correct. Well they probably won't cuz i'm getting that c9 :rolleyes: