I still have a million questions about the API and lifecycle of various things and I'm also wondering if there's any other information available than this forum and the subforum? Since I know very little at this point, that's of course going to be a lot, but I intend to create a fairly sizable UI client-only mod so I'm here to learn. I'd appreciate insight into what I've misunderstood. I thought AddPlayerPostInit was called after the player instance is initialized and that this would also initialize the GLOBAL.ThePlayer reference. I've seen this referenced many times in similar fashion so I'm having trouble understanding the lifecycle of these global variables. ThePlayer : ListenForEvent ( "itemget", function ( slot, item, src_pos ) print ( 'HelloWorld heard itemget called' ) end ) -the below code works fine as a replacement though -player:ListenForEvent("itemget", function(slot, item, src_pos) print('HelloWorld heard itemget called') end) end ) a"]:2: attempt to index field 'ThePlayer' (a nil value)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |