04-15-2017, 11:21 PM
Hi,
I'm actually creating a plugin for Cuberite. I wanted to create web admin pages for it, so, like Cuberite's LUA API says, I wrote this code:
But it wasn't working (3rd argument should be string, not function (incorrect docs?)). So, I've tried something like this:
And, now "example1" appeared in the webadmin.
But, instead of "asd", webpage displays exactly the same content, as for Home. Maybe it's a bug, or I'm an idiot? ^^
Thank you for your help.
I'm actually creating a plugin for Cuberite. I wanted to create web admin pages for it, so, like Cuberite's LUA API says, I wrote this code:
Code:
cWebAdmin.AddWebTab("Example", "example1", function(a_Request, a_UrlPath)
return "asd", "text/html; charset=utf-8"
end)
But it wasn't working (3rd argument should be string, not function (incorrect docs?)). So, I've tried something like this:
Code:
cWebAdmin.AddWebTab("Example", "example1", "example2", function(a_Request, a_UrlPath)
return "asd", "text/html; charset=utf-8"
end)
And, now "example1" appeared in the webadmin.
But, instead of "asd", webpage displays exactly the same content, as for Home. Maybe it's a bug, or I'm an idiot? ^^
Thank you for your help.