Jump to content

Archived

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

Denver200

Help with the script is very important!

Recommended Posts

At me displays a script, and how to make that gg read and fulfilled a script? What command?

PicsArt_07-27-12.31.54.png

Screenshot_20180725-162437.png

Share this post


Link to post
Share on other sites

4 minutes ago, Pyxe said:

I think what hes saying is how can he execute a lua script from a server using gg.makeRequest content

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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
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()

 

Share this post


Link to post
Share on other sites

×
×
  • Create New...