- Documentation
- Server functions
- renameResource
Function
renameResource
Renames a stopped resource. In the current server version the function is not wired up yet and returns false with a warning.
Syntax
resource renameResource(resource theResource, string newResourceName [, string organizationalPath])Arguments
theResourceresource- The resource (must be stopped).
newResourceNamestring- The new name.
organizationalPathstring, optional- A subfolder.
Returns
The resource under the new name or false.
Example
local res = getResourceFromName("stara_nazwa")
stopResource(res)
renameResource(res, "nowa_nazwa")