[Question] LUA menu

User Tag List

Results 1 to 3 of 3
  1. #1
    mager1794's Avatar Member
    Reputation
    356
    Join Date
    Feb 2008
    Posts
    703
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Question] LUA

    tell me would this example (if i used real functions) would work
    im mainly talking about the local if and local x

    Code:
    local if = pUnit:Math.Random(1,x)
    
    function test_OnEnterCombat(pUnit, Event)
    local x = 5
    pUnit:EXAMPLE
    pUnit:EXAMPLE
    pUnit:EXAMPLE
    end
    Lunar Gaming - Reaching For The Stars

    [Question] LUA
  2. #2
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can't use 'if' as a variable name, it's a saved word. Also, since x is only declared in test_OnEnterCombat, it's not available at the bigger scope.

  3. #3
    mager1794's Avatar Member
    Reputation
    356
    Join Date
    Feb 2008
    Posts
    703
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i figured i'd have to change the names but thanks spidey you answered my questions : ) +Rep
    Lunar Gaming - Reaching For The Stars

Similar Threads

  1. [Question] LUA :P
    By Creepfold in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 02-28-2008, 05:00 PM
  2. question->lua mob code.
    By secretdragon008 in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 02-13-2008, 03:13 PM
  3. [Question]-Lua Problem
    By Peter1337 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 02-07-2008, 07:59 AM
  4. [Question] LUA problem
    By Peter1337 in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 02-01-2008, 09:21 AM
  5. Couple questions, lua involved + other?
    By blah7 in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 01-18-2008, 03:42 PM
All times are GMT -5. The time now is 02:27 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search