Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Stored Procedure [dbo].[CreatePlayer]

Newbie Spellweaver
Joined
Jun 5, 2009
Messages
22
Reaction score
0
Hello,

I've got a little Problem on creating a char via Stored Procedure...

Here's the way I did on my server:

1.Step:

Hexing DBserver:

Search:

INSERT INTO Player ( [UID], [Name], [Class], [Strength], Health, Intelligence, Wisdom, Dexterity, [CurHP], [CurMP], [Map], [X], [Y], [Z], [Face], [Hair]) VALUES ( %d, '%s', %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d)

overwrite with:

EXEC CreatePlayer %d,%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d

NULLOUT rest.

2. Step:

Creating new Stored Procedure... Using MSSQL 2000


CREATE PROCEDURE [dbo].[CreatePlayer]

@uid int,
@admin tinyint,
@name varchar(14), --Maybe something in here, because my maxlength of charname is 8?
@class tinyint,
@strength tinyint,
@health tinyint,
@intelligence tinyint,
@wisdom tinyint,
@dexterity tinyint,
@curhp smallint,
@curmp smallint,
@map tinyint,
@x int,
@y int,
@z int,
@face tinyint,
@hair tinyint
AS

INSERT INTO Player ( [UID], [Admin], [Name], [Class], [Strength], Health, Intelligence, Wisdom, Dexterity, [CurHP], [CurMP], [Map], [X], [Y], [Z], [Face], [Hair])
VALUES ( @uid, 8,@name,@class,@strength, @health,@intelligence,@wisdom, @dexterity,@curhp,@curmp, 0, 256916, 248809, 17447, @face, @hair)

GO



Now, when i start server and want to create a new Player, that message appears: "Problem occurred on creating your character. -NA_ERROR."

Can anyone help me please??


posi90
 
Experienced Elementalist
Joined
Nov 10, 2007
Messages
260
Reaction score
2
"Suddenly it goes"

Let me explain, you have to restart SQL server to make that SP activated.

I guess you restarted ur computer but thats fine also.


- Mukso
 
Upvote 0
Back
Top