loversSlayer Posted April 16, 2020 Share Posted April 16, 2020 function a() local Avar = gg.prompt({'text1', 'text2', 'text3'}, {Avar[1],Avar[2],Avar[3]}, {'number','number','number'}) if Avar == nil then os.exit end Log: attempt to index ? (nil value) with key 1 global Avar if i change 2nd table as nil, then it works perfectly. But i wanna previous values every time using this function. Link to comment Share on other sites More sharing options...
Administrators Enyby Posted April 16, 2020 Administrators Share Posted April 16, 2020 Define local variable before function. Link to comment Share on other sites More sharing options...
loversSlayer Posted April 16, 2020 Author Share Posted April 16, 2020 Just now, Enyby said: Define local variable before function. Already got it, but ty Link to comment Share on other sites More sharing options...
Question
loversSlayer
Log: attempt to index ? (nil value) with key 1 global Avar
if i change 2nd table as nil, then it works perfectly. But i wanna previous values every time using this function.
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.