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!

[Help]about cashpoint

Newbie Spellweaver
Joined
Dec 6, 2020
Messages
18
Reaction score
1
What must I do?
al2izona - [Help]about cashpoint - RaGEZONE Forums




USE [RF_WORLD]
GO
/****** Object: Trigger [dbo].[AutoCash] Script Date: 01/16/2014 21:55:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER TRIGGER [dbo].[AutoCash]
ON [dbo].[tbl_general]
FOR UPDATE
AS
BEGIN
SET NOCOUNT ON;

DECLARE @TimePlay int;
DECLARE @TSerial int;
DECLARE @DCK bit;

DECLARE @BSerial int;
DECLARE @BAccount varchar(17);
DECLARE @BDCK bit;

DECLARE @CSerial int;
DECLARE @CId varchar(17);
DECLARE @Cash int;
DECLARE @Bonus int;

DECLARE @TimeBonus int;
DECLARE @Reward int;

if update(TotalPlayMin)
begin
SELECT @TSerial = Serial, @DCK = DCK, @TimePlay = TotalPlayMin From Inserted
if (@TimePlay > 0 And @DCK = 0)
begin
SELECT @BSerial = Serial, @BAccount = Account, @BDCK = DCK From tbl_base Where Serial = @TSerial
if (@BSerial > 0 And @BDCK = 0)
begin
SET @TimeBonus = (@TimePlay*1)
SELECT @CSerial = serial, @CId = id, @Cash = Cash, @Bonus = Bonus From BILLING.dbo.tbl_UserStatus Where id = @BAccount
if (@TimeBonus > @Bonus And @CSerial > 0)
begin
SET @Reward = (@TimeBonus-@Bonus)
Update BILLING.dbo.tbl_UserStatus
SET Cash = (@Cash+@Reward), Bonus = @TimeBonus
Where id = @CId
end
end
end
end
END
<br><div><br></div><div><br></div><div><br></div>
 
Newbie Spellweaver
Joined
Aug 30, 2022
Messages
62
Reaction score
31
"I'm a newbie." You are learning to setup a server or already hosting one. SQL is a large part of being able to do that.

You need to read up on SQL in general and learn how it works, what it does and how to write SQL queries.

Then you'll notice your two error messages that both state the same error.
"Invalid Column name "Bonus" "

So you check your SQL table and see if a column called "Bonus" exists. And fix the query so it does what you expect it to do.
 
Upvote 0
Newbie Spellweaver
Joined
Dec 6, 2020
Messages
18
Reaction score
1
"I'm a newbie." You are learning to setup a server or already hosting one. SQL is a large part of being able to do that.

You need to read up on SQL in general and learn how it works, what it does and how to write SQL queries.

Then you'll notice your two error messages that both state the same error.
"Invalid Column name "Bonus" "

So you check your SQL table and see if a column called "Bonus" exists. And fix the query so it does what you expect it to do.
I can't do it myself because I can't see it. please help me bro
 
Upvote 0
Newbie Spellweaver
Joined
Jan 21, 2018
Messages
33
Reaction score
6
Well the clue there is, column. you need learn what is "column in sql table". After you figure that out, check table and check the column what happen to that.
 
Upvote 0
Back
Top