Jump to content
  • 0

Loading Variable From File Bug


Guest ttah11

Question

Posted
local config={
	test=true
}

local configPath=gg.getFile()..'.cfg'

gg.saveVariable(config,configPath)

print(load(configPath))

Screenshot_20200113-092416.png.a856b01034e524a5f0636dccd50c2a14.png

@Enyby Am I doing something wrong?

5 answers to this question

Recommended Posts

  • Administrators
Posted
18 minutes ago, ttah11 said:

print(load(configPath))

must be

print(assert(loadfile(configPath), "Failed load config from "..configPath)())

Posted

Yeah but it says 'attempt to call a nil value'

  • Administrators
Posted

Then you doing something wrong because it is work for me.

local config={
	test=true
}

local configPath=gg.getFile()..'.cfg'

gg.saveVariable(config,configPath)

print(assert(loadfile(configPath), "Failed load config from "..configPath)()) 

 

[added 0 minutes later]

изображение.png

Posted

I don't know what is causing this issue. It fails on both of my phones and on my pc using LDPlayer and it says the same thing.

Posted

Oh nevermind I found the issue, thanks for the help.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.