Jump to content
  • 0

Help with the script is very important!


Denver200

Question

7 answers to this question

Recommended Posts

32 minutes ago, ForbiddenSaga said:

ah.... okay...
assert(load(gg.makeRequest))

The Script Just Ends When I Execute Script, Can You Like Make An Example?

Link to comment
Share on other sites

3 hours ago, Pyxe said:

how can he execute a lua script from a server using gg.makeRequest content

2 hours ago, Pyxe said:

Can You Like Make An Example?

Information from GG API docs and Lua reference manual is more than enough to solve this task.
Have you at least tried it before asking for help?

Anyway, here is an example that you have asked for. In any case Lua and GG API knowledge will be required to apply the example in your script.

local script = gg.makeRequest('https://pastebin.com/raw/6nPaduxX')
if type(script) == 'string' then
  print('Error:', script)
  -- os.exit()
end
if script.content == nil or script.content == '' then
  print('Error: Server response was empty')
  -- os.exit()
end

local func, message = load(script.content)
if func == nil then
  print('Error:', message)
  -- os.exit()
end
func()

 

Link to comment
Share on other sites

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.