Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EOv2] Adding Stats (Or A Stat)


TheRexion
 Share

Recommended Posts

I hate having to ask for help again, but this really just isn't working.  I'm trying to add a Player Stat called Health, to have a different way to determine the player's HP.  It only changes when the Player level's, and they can't manually add to it.  But for some reason it always gives me–[This](http://dl.dropbox.com/u/25798955/Capture12.PNG)–and I'm not sure what I'm doing incorrectly.

I have this in both places (server and client):
```
Public Enum Stats
    Strength = 1
    Endurance
    Intelligence
    Agility
    Willpower
    Health
    ' Make sure Stat_Count is below everything else
    Stat_Count
End Enum
```
I checked through the source, trying to find any other place where I may need to define the 6th Stat, but I get nothing… Any help would be appreciated.
Link to comment
Share on other sites

@Ecclestio:

> I hate having to ask for help again, but this really just isn't working.  I'm trying to add a Player Stat called Health, to have a different way to determine the player's HP.  It only changes when the Player level's, and they can't manually add to it.  But for some reason it always gives me–[This](http://dl.dropbox.com/u/25798955/Capture12.PNG)–and I'm not sure what I'm doing incorrectly.
>
> I have this in both places (server and client):
> ```
> Public Enum Stats
>     Strength = 1
>     Endurance
>     Intelligence
>     Agility
>     Willpower
>     Health
>     ' Make sure Stat_Count is below everything else
>     Stat_Count
> End Enum
> ```
> I checked through the source, trying to find any other place where I may need to define the 6th Stat, but I get nothing… Any help would be appreciated.

Adding a stat is not only this my friend, you have to do a lot more xD
Find out how the client and server know those stats, and make your new stat known for the client and server.
After that find the function/sub of player leveling in the server side I think, and make sure your new stat will raise if the player can level up.
Link to comment
Share on other sites

That… doesn't help me at all.  I've searched through the client and the error doesn't seem to derive from having new subs, but from an old one that just counts them up from Stat_Count.  That's what's erroring for me, not being unable to use it, as I've got that part fine.
Link to comment
Share on other sites

It's highlighting this:
```
For i = 1 To Stats.Stat_Count - 1
        SetPlayerStat Index, i, Buffer.ReadLong
        frmMain.lblCharStat(i).Caption = GetPlayerStat(MyIndex, i)
    Next
```
It says i is 6 and that it doesn't exist.  But it _should_ exist, since I added it to the Stat_Count.
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...
@xxXReichoXxx:

> frmMain.lblCharStat(i).Caption = GetPlayerStat(MyIndex, i)
>
> u mean u dnt have label for ur stat?? :D

Please look at the date of the last poster before replying in a thread. This thread is well over two months old.

This is considered Necroposting and is against [the rules](http://www.touchofdeathforums.com/smf/index.php/topic,72426.0.html).

**#locked**
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...