Troubleshooting macros
From CLUMP
Error messages and possible solutions (in alphabetical order):
*FILE* not found.
When it can occur: When logging into game, or reloading macros.
Try this/solution:
- Caused by lack of quotes around the name of included files
- Mispelled file name
- (Windows) try copying (F2 to edit, CTRL+C to copy*) & pasting in file name from finder or explorer.
- (Mac) (1) select the file, (2) click on the filename once (the filename should now be highlighted), (3)copy (Command+C), and (4)paste (Command+V) into the Macro File as below
- Edit your macro files and look for 'include' lines, ensure the file names have " around them. Example:
include "myfilename.txt"
- Note files must be in
- (Windows) clanlord/data/macros folder
- (Mac) in the Macros Folder where the ClanLord.app resides (i.e. if Clan Lord.app is located in Applications/ClanLord, then the file must be in /Applications/ClanLord/Macros .)
- Note: On Mac & Windows, the dot and the 3 character extension after a file’s name is hidden by default. So moonstone_functions.txt only shows up as moonstone_functions. You can force the File Explorer (Windows)/Finder (Mac) to show full file names (which is recommended for security) by altering the settings/preferences of the FileExplorer/Finder to show the 3 character extension. On the Mac select Finder/Preferences…>Advanced>√Show all filename extensions to show the full filenames. On Windows File Explorer go to the File Explorer Settings.
Mac Finder Preferences show extension setting:
Option not recognized.
When it can occur: When logging into game, or reloading macros.
Try this/solution:
- Convert Mac macros to PC format by using menu option ?/Convert Mac Macro
- Then navigate to file, select the file then click on OK.
- Repeat for any files you recently received from another or copied in.
Reload Macros greyed out
When it can occurr: after reinstalling the client, installing a different version of the client, such as Clieunk, transferring to a new computer.
Try this/solution:
- Open the client
- Choose "Transfer Settings" from the first dropdown menu
- In the pop-up window, click "Choose Macros Folder"
- Navigate to the folder labeled "Macros" in the Clanlord folder, in the applications folder.
- Select the Macros folder and click "open"
- Close the pop-up window
Macro not operating as planned
Often you'll write a macro it either doesn't work as expected if at all. Here are a few tips of things to check:
Syntax
- Ensure your "/action " or "/select " commands have a space after them.
- Remember to terminate text input with the "\r".
- Ensure your if statements are terminated by end if.
- Ensure loop variables are initialized outside of the loop (Before the label that the goto statement targets.) (i.e. set i 0).
- For macros with multiple lines, ensure they are enclosed in { }s
- In loops, ensure you are incrementing the counter. (i.e. set i + 1).
trigger "/count"
{ {
loop variable initialization set i 1
label label loopstart
conditional if i<11
command... i "\r"
increment loop variable set i + 1
command pause 4
goto label goto loopstart
else else
command... "Go!\r"
end if end if
} }
Variables
- Check your variable declarations. If you are setting a global variable use setglobal.
- Check what is in the variable as it goes through each stage use the macro message command (i.e. message "variablename is: " variable.)
- Check the item's true name by assigning it to a variable and using the message command to see the item's name. (i.e. setglobal gNeckItem @my.neck_item .)
