Solved CommandLog not working

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

MrBlack

New Member
Jan 2, 2019
5
0
1
23
function checkFile(name: player) :: boolean:
if file "../../../plugins/CommandLog/data/%{_name}%.log" dosen't exist:
return false
else:
return true

function createFile(name: player):
if (checkFile({_name}) is false):
create file "../../../plugins/CommandLog/data/%{_name}%.log"
message "&aCreated %{_name}'s display name%'s log file." to console

function log(name: player, issue: text):
log "%{_name}% issued server command: /%{_issue}%" to "../../../plugins/CommandLog/data/%{_name}%.log"

on join:
createFile(player)

on command:
if event is not cancelled:
set {_cmd} to command
log(player, {_cmd})




Errors

Line 2: Can't understand this condition: 'file "../../../plugins/CommandLog/data/%{_name}%.log" dosen't exist' (script.sk, line 2: if file "../../../plugins/CommandLog/data/%{_name}%.log" dosen't exist:')

Line 4: 'else' has to be placed just after an 'if' or 'else if' section (script.sk, line 4: else:')
 
Last edited:
Status
Not open for further replies.