[Question] Lua_GetTop menu

Shout-Out

User Tag List

Results 1 to 6 of 6
  1. #1
    -Ryuk-'s Avatar Elite User CoreCoins Purchaser Authenticator enabled
    Reputation
    529
    Join Date
    Nov 2009
    Posts
    1,028
    Thanks G/R
    38/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Question] Lua_GetTop

    Hello again,

    I seem to be having a problem with my Lua_GetTop Function. As far as I am aware, this should work; however the asm is returning 0 bytes.

    I know my InjectAndExecuteReturn works, as it works for other functions.

    Code:
            state = Memory.Read<uint>((Memory.BaseAddress + (uint) Patchables.Pointers.LuaInterface.LuaState));
    
            public static int GetTop(IntPtr state)
            {
                string[] asm = new string[]
                                   {
                                       "push " + state,
                                       "call " + (Memory.BaseAddress + Patchables.Pointers.LuaInterface.LuaGetTop),
                                       "add esp, 0x4",
                                       "retn"
                                   };
                
                return Convert.ToInt32(InjectAndExecuteReturn(asm));
            }

    Addresses: (4.2a; yes im EU)
    Code:
     LuaGetTop = 0x0002A9C0,
     LuaState = 0x00A7DCA0,

    Any ideas?

    Thanks
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

    [Question] Lua_GetTop
  2. #2
    d3000's Avatar Private
    Reputation
    1
    Join Date
    Jul 2011
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "add esp, 0x4",
    For LuaGetTop it's "add esp, 8".

  3. #3
    Bananenbrot's Avatar Contributor
    Reputation
    153
    Join Date
    Nov 2009
    Posts
    384
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by d3000 View Post
    For LuaGetTop it's "add esp, 8".
    That would be the case for lua_settop.

    Originally Posted by -Ryuk- View Post
    I know my InjectAndExecuteReturn works, as it works for other functions.
    So... isn't it supposed to work then?
    Last edited by Bananenbrot; 08-30-2011 at 05:09 PM.

  4. #4
    jjaa's Avatar Contributor
    Reputation
    245
    Join Date
    Dec 2006
    Posts
    562
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you sure the Top isn't 0?

  5. #5
    Bananenbrot's Avatar Contributor
    Reputation
    153
    Join Date
    Nov 2009
    Posts
    384
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by jjaa View Post
    Are you sure the Top isn't 0?
    I think by "the asm is returning 0 bytes" he means that Convert.ToInt32() gets a byte array of length 0...

  6. #6
    -Ryuk-'s Avatar Elite User CoreCoins Purchaser Authenticator enabled
    Reputation
    529
    Join Date
    Nov 2009
    Posts
    1,028
    Thanks G/R
    38/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Bananenbrot View Post
    I think by "the asm is returning 0 bytes" he means that Convert.ToInt32() gets a byte array of length 0...
    The function is returning Byte[0]
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

Similar Threads

  1. Model Changing Question
    By MasterYuke in forum World of Warcraft General
    Replies: 6
    Last Post: 09-17-2006, 09:56 PM
  2. Couple Private Server questions
    By Jboz in forum World of Warcraft General
    Replies: 21
    Last Post: 07-26-2006, 07:37 PM
  3. Sorry..newb mail question
    By nolbishop in forum World of Warcraft General
    Replies: 2
    Last Post: 06-07-2006, 07:21 PM
  4. Question..
    By janzi9 in forum Community Chat
    Replies: 3
    Last Post: 04-02-2006, 10:20 AM
  5. A GALB question
    By bassman in forum World of Warcraft General
    Replies: 4
    Last Post: 03-28-2006, 09:49 AM
All times are GMT -5. The time now is 03:47 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