NIL value when referencing text box
Constructed a working tutorial project then tried to build something of my own and am having trouble. After 90 minutes hacking at it and reading, it is now time to go to work so I humbly ask for assistance.
Project: Simple in game calculator form to take entered values and give a DKP estimate based on a modifuied Zero Sum formula. LUA Code (with line numbers inserted for easy referral): Code:
5 local AdjUnits, Units, UnitsBox, Seed, SeedBox; Where DKP2CalcFormUnits is a single line editbox. This edit box has a positive integer value when function is called. Units should be set to the numeric value of UnitsBox Error Message: Recieving error on line 8 "attempt to index local 'UnitsBox' (a nil value)" |
Do you have a frame called:
DKP2CalcFormUnitsEdit Defined in your XML? (I'm hoping that the use of getglobal in this example is because you've simplied the code for diagnosis and removed some otherwise dynamic values, since it's really not doing anything on its own) |
I corrected the problem, removing the use of getglobal corrected it and I am not sure why. A tutorial I went by used it in every case and I was using it to mimic what I saw in the sample code.
|
All times are GMT -6. The time now is 11:30 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI