Goodguy Posted June 23, 2016 Share Posted June 23, 2016 (edited) I've looked at http://lua-users.org/wiki/MetatableEvents and some other tutorial websites but can't seem to understand it. Currently I'm getting an issue that pops up as "Object table 0x1060508076 did not have __call metatable set" and cannot seem to find a solution to my issue. I know the __call event allows for the table to be used as a function but can't seem to quite understand it. If anyone has a way to explain it a bit more in-depth that would be greatly appreciated! Thank you. Edited July 2, 2016 by Goodguy Link to comment Share on other sites More sharing options...
RoboMat Posted June 23, 2016 Share Posted June 23, 2016 The error is trying to tell you that somewhere in your code you try to call a table as a function. So you probably have something like local foo = {}; foo(); in your code. The stack trace should tell you in which file and in which line the error occured. Goodguy 1 Link to comment Share on other sites More sharing options...
Goodguy Posted June 23, 2016 Author Share Posted June 23, 2016 1 hour ago, RoboMat said: The error is trying to tell you that somewhere in your code you try to call a table as a function. So you probably have something like local foo = {}; foo(); in your code. The stack trace should tell you in which file and in which line the error occured. So say I have something like this: Players = {}; function Players.IsSplitscreen(_player) ~Code Here end Events.OnCreateIsoPlayer.Add(Players.IsSplitscreen); It gives me an error at the Events.OnCreateIsoPlayer.Add(Players.IsSplitscreen); part. And also thanks for your help! Link to comment Share on other sites More sharing options...
EnigmaGrey Posted June 23, 2016 Share Posted June 23, 2016 OnCreateIsoPlayer doesn't exist, so that's likely why it fails. You want OnCreatePlayer. Goodguy 1 Link to comment Share on other sites More sharing options...
Goodguy Posted June 23, 2016 Author Share Posted June 23, 2016 (edited) 12 minutes ago, EnigmaGrey said: OnCreateIsoPlayer doesn't exist, so that's likely why it fails. You want OnCreatePlayer. Ah, I've been using https://www.loneboat.com/pzlist#attack as the reference to all the events. Thank you, I'll find the one located on the forums here then. Or is there an offical list? Edited June 23, 2016 by Goodguy Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now