LUA Variable Help (NOT A BIG SCRIPT) menu

User Tag List

Results 1 to 6 of 6
  1. #1
    Envoke's Avatar Contributor
    Reputation
    105
    Join Date
    Jan 2009
    Posts
    201
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    LUA Variable Help (NOT A BIG SCRIPT)

    I am making a script and I need to increase the value of a variable by 1 each time the event hits. I tried a few different thing, but nothing is working.

    this is a very small sample code to show you what im trying to do.
    Code:
    local ranint = 0
    
    function test(pUnit, event, pMisc)
    ranint + 1
    end

    LUA Variable Help (NOT A BIG SCRIPT)
  2. #2
    y2kss66's Avatar Member
    Reputation
    104
    Join Date
    Jan 2008
    Posts
    778
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by nathan803029 View Post
    I am making a script and I need to increase the value of a variable by 1 each time the event hits. I tried a few different thing, but nothing is working.

    this is a very small sample code to show you what im trying to do.
    Code:
    local ranint = 0
    
    function test(pUnit, event, pMisc)
    ranint + 1
    end
    you will do something like this:

    Code:
    local ranint = 0
    
    function test(pUnit, event, pMisc)
    ranint ++
    end
    try that!

  3. #3
    Mildan's Avatar Member
    Reputation
    10
    Join Date
    Feb 2009
    Posts
    80
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ehm... try.. registering it? idk :P

  4. #4
    Envoke's Avatar Contributor
    Reputation
    105
    Join Date
    Jan 2009
    Posts
    201
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I used this and it worked fine, thanks for help tho guys
    +rep

    Code:
    local ranint = 0
    
    function test(pUnit, event, pMisc)
    ranint = ranint + 1
    end

  5. #5
    y2kss66's Avatar Member
    Reputation
    104
    Join Date
    Jan 2008
    Posts
    778
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    glad to help!
    maybe my programming class did help me after all!

    lol

  6. #6
    Abstraction's Avatar Member
    Reputation
    32
    Join Date
    May 2008
    Posts
    472
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OMG HAI, im posting in EPIC thread

Similar Threads

  1. [lua help] my lich king script wont work
    By bomsemann in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 01-31-2009, 09:17 PM
  2. [Help].DLL files in Script Bin not working?
    By MisterEMU in forum World of Warcraft Emulator Servers
    Replies: 18
    Last Post: 07-08-2008, 05:10 AM
  3. New to LUA need help with script
    By nickelo in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 06-30-2008, 01:34 PM
  4. [Help] New to LUA, Need help with script.
    By nickelo in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 03-14-2008, 11:23 PM
  5. [Lua]Boss phases not working, NEED PRO HELP!!
    By blah7 in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 01-23-2008, 02:30 PM
All times are GMT -5. The time now is 09:31 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search