[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(idN'IsUserTable') = 1)
drop table [dbo].[char_items]
GO

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

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

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

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

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

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

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

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

CREATE TABLE 
[dbo].[hotkeys] (
    [
id] [intIDENTITY (11NOT NULL ,
    [
owner] [varchar] (15COLLATE Turkish_CI_AS NOT NULL ,
    [
slot] [intNOT NULL ,
    [
type] [intNOT NULL ,
    [
hotkeyid] [intNOT NULL 
ON [PRIMARY]
GO

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

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

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

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

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

CREATE TABLE 
[dbo].[users] (
    [
id] [intIDENTITY (11NOT NULL ,
    [
username] [varchar] (20COLLATE Turkish_CI_AS NULL ,
    [
password] [varchar] (20COLLATE Turkish_CI_AS NULL ,
    [
blocked] [bitNULL ,
    [
connected] [bitNULL ,
    [
online] [char] (10COLLATE 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: