hoangninyb Posted October 16, 2021 Share Posted October 16, 2021 I have created an empty table Table = {} after running the script, the items have been added to it. can I save it to memory? Link to comment Share on other sites More sharing options...
hoangninyb Posted October 17, 2021 Author Share Posted October 17, 2021 1 hour ago, AKidWithMidgetFriend said: Có thể thử ghi vào bảng trong tập lệnh thay vì để nó phụ thuộc vào việc thực thi theo cách đó bạn có thể lưu nó bằng gg .saveVariable () (cách sử dụng có thể được tìm thấy tại đây https://gameguardian.net/help/classgg.html#a204f5dea60cac80c39521ceb4936a83b ) Nếu thực sự cần thiết phải đợi cho đến khi bảng được ghi vào thì bạn có thể có tập lệnh của mình kiểm tra chức năng cục bộ () if table [1] == nil then gg .sleep (1000) trả lại séc () kết thúc khác làm gg .saveVariable (var trong bảng của bạn) kết thúc kết thúc (Kiểm tra xem có gì được ghi vào bảng hay không nếu chưa thì hãy đợi 1 giây trước khi kiểm tra lại) Mặc dù vậy, mã này không kiểm tra xem nó đã được lưu hay chưa, vì vậy cần kiểm tra xem tệp mà nó lưu vào có hiện diện trên thiết bị hay không I mean how to save the file containing the table with the items added! Link to comment Share on other sites More sharing options...
AKidWithMidgetFriend Posted October 17, 2021 Share Posted October 17, 2021 8 hours ago, hoangninyb said: I mean how to save the file containing the table with the items added! gg.saveVariable().... It's in my previous reply I'm sorry if you didn't understand. Link to comment Share on other sites More sharing options...
hoangninyb Posted October 19, 2021 Author Share Posted October 19, 2021 Thank! it worked! Link to comment Share on other sites More sharing options...
BadCase Posted October 16, 2021 Share Posted October 16, 2021 Need a bit more detail, it will be saved in memory as the variable "Table" until you exit the script or set it to nil, but you might mean something else. Link to comment Share on other sites More sharing options...
AKidWithMidgetFriend Posted October 17, 2021 Share Posted October 17, 2021 10 hours ago, hoangninyb said: hiện tại khi tôi chạy script, các mục sẽ được thêm vào bảng và sẽ được hiển thị trong menu, tôi không muốn lần sau khi mở script lại phải thêm các mục nữa! I mean even after exiting GG, then restarting! Could try writing into the table in the script instead of having it depend on execution that way you can just save it with gg.saveVariable() (usage can be found here https://gameguardian.net/help/classgg.html#a204f5dea60cac80c39521ceb4936a83b) If it's absolutely necessary to wait until after the table is written into then you could have your script do local function checks() if table[1] == nil then gg.sleep(1000) return checks() end else do gg.saveVariable(your table's var) end end (A check to see if anything is written into the table if not then wait 1 second before checking again) This code doesn't check if it's already saved though so there should be a check for if the file it saves to is present on the device Link to comment Share on other sites More sharing options...
Question
hoangninyb
I have created an empty table
after running the script, the items have been added to it.
can I save it to memory?
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.