Energy on RP

Explote

New Member
Jun 3, 2011
26
0
Using this RP emulator, very new to coding etc. When you shoot using the command, everytime its supposed to take 2 energy each shot but doesnt.

This is the code for it:

Code:
Instance.BroadcastMessage(RoomChatComposer.Compose(Actor.Id, "*Shoots " + Username + " with their G3 causing " + HitPoint + " damage! [-2e]*", 0, ChatType.Shout));
                                    Instance.BroadcastMessage(RoomChatComposer.Compose(TargetActor.Id, "[" + Target.Health + "/100]", 0, ChatType.Shout));
                                    Session.CharacterInfo.UpdateScore(MySqlClient, +reward);
                                    Session.CharacterInfo.UpdateWantedLVL(MySqlClient, 1);
                                    Session.CharacterInfo.UpdateEnergy(MySqlClient, -2);

Anyone have any idea? please and thanks
 

Explote

New Member
Jun 3, 2011
26
0
Not sure where that is as just working off of Reality, Not sure if this is what you're looking for but:

Code:
public void UpdateEnergy(SqlDatabaseClient MySqlClient, int Amount)
        {
           // mEnergy += Amount;

           // MySqlClient.SetParameter("userid", mId);
           // MySqlClient.SetParameter("energy", mEnergy);
           // MySqlClient.ExecuteNonQuery("UPDATE users SET energy = @energy WHERE id = @userid LIMIT 1");
        }
 

JayC

Well-Known Member
Aug 8, 2013
5,505
1,401
Not sure where that is as just working off of Reality, Not sure if this is what you're looking for but:

Code:
public void UpdateEnergy(SqlDatabaseClient MySqlClient, int Amount)
        {
           // mEnergy += Amount;

           // MySqlClient.SetParameter("userid", mId);
           // MySqlClient.SetParameter("energy", mEnergy);
           // MySqlClient.ExecuteNonQuery("UPDATE users SET energy = @energy WHERE id = @userid LIMIT 1");
        }
Isn't all that code commented out? so it won't update their energy?
 

Users who are viewing this thread

Top