Results 1 to 10 of 10

Thread: Stats error?

  1. #1
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default Stats error?

    Ok, so I've finally decided to use stats in my script but seems that setvariable and Incvariable seem to do the same thing when commiting to the server.

    Here are two commits when I used setvariable:
    1) http://stats.villavu.com/commit/12734
    2) http://stats.villavu.com/commit/12746

    Here are two commits when I used incvariable:
    1) http://stats.villavu.com/commit/12813
    2) http://stats.villavu.com/commit/12825

  2. #2
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,691
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    I think you're not supposed to use setvariable at all.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  3. #3
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    I solved the problem by resetting the variable, but i don't see whats the point of having it in the includes, i thought setvariable just set the variable to whatever value you say, but it doesn't.

  4. #4
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    The point of having it in the include is to initiate a variable that hasn't been added to yet. Don't go raging about because you can't read function headers.

  5. #5
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Simba Code:
    (*
    stats_SetVariable
    ~~~~~~~~~~~~~~~~~

    .. code-block:: pascal
        stats_SetVariable(VarName: string; NewValue: Integer);

    Sets the passed variable to the new value regardless of old value. This method
    behaves much like stats_InitVariable but checks for the variable present first.

    Example:
    .. code-block:: pascal
        stats_SetVariable('runite', 10)
    *)

    Now, does that say anything about initiating a variable? Because there is already a proc for doing that, and if you actually used the function then you should've noticed that it does the same thing as Incvariable, which i was pointing out. Also, I was never raging, I was only wondering why it was included because its just a waste of 30 or so lines.

    P.S. If i was raging I'd use an emote to show it, because words don't show emotions.

  6. #6
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    I'm sorry, I thought you were trying to use "stats_InitVariable". The header for stats_InitVariable says not to call it anywhere else. Last time I looked at Stats.Simba, there were only 4 functions. Apologies.

  7. #7
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    No problemo, I understand, it was easy to be mistaken, apology accepted

  8. #8
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

  9. #9
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    What are you bumping it for? Is your question not answered?


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  10. #10
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    You're only supposed to use stats_IncVariable and stats_Commit. The rest of the stats methods are used somehow in those functions.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •