mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 20:41:41 +09:00
Dont need to start server-interface with return now
This commit is contained in:
@@ -45,13 +45,11 @@ function ExpLib.player_return(rtn)
|
|||||||
else game.player.print(table.to_string(rtn))
|
else game.player.print(table.to_string(rtn))
|
||||||
end
|
end
|
||||||
elseif is_type(rtn,'function') then game.player.print('Cant Display Functions')
|
elseif is_type(rtn,'function') then game.player.print('Cant Display Functions')
|
||||||
elseif is_type(rtn,'userdata') then game.player.print('Cant Display Userdata')
|
|
||||||
else game.player.print(tostring(rtn))
|
else game.player.print(tostring(rtn))
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if is_type(rtn,'table') then log(table.to_string(rtn))
|
if is_type(rtn,'table') then log(table.to_string(rtn))
|
||||||
elseif is_type(rtn,'function') then log('Cant Display Functions')
|
elseif is_type(rtn,'function') then log('Cant Display Functions')
|
||||||
elseif is_type(rtn,'userdata') then log('Cant Display Userdata')
|
|
||||||
else log(tostring(rtn))
|
else log(tostring(rtn))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ end
|
|||||||
|
|
||||||
commands.add_command('server-interface', 'Runs the given input from the script', {'code',true}, function(event,args)
|
commands.add_command('server-interface', 'Runs the given input from the script', {'code',true}, function(event,args)
|
||||||
local callback = args.code
|
local callback = args.code
|
||||||
|
if not string.find(callback,'%s') and not string.find(callback,'return') then callback = 'return '..callback end
|
||||||
local success, err = Server.interface(callback)
|
local success, err = Server.interface(callback)
|
||||||
player_return(err)
|
player_return(err)
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user