Troubleshooting macros

From CLUMP
Revision as of 11:11, 23 November 2013 by Mwadmin (talk | contribs) (→‎*FILE* not found.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Error messages and possible solutions (in alphabetical order):[edit]

*FILE* not found.[edit]

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:

Finder Preferences.jpg

Option not recognized.[edit]

When it can occur: When logging into game, or reloading macros.
Try this/solution:

  1. Convert Mac macros to PC format by using menu option ?/Convert Mac Macro
  2. Then navigate to file, select the file then click on OK.
  • Repeat for any files you recently received from another or copied in.

Macro not operating as planned[edit]

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[edit]

  1. Ensure your "/action " or "/select " commands have a space after them.
  2. Remember to terminate text input with the "\r".
  3. Ensure your if statements are terminated by end if.
  4. Ensure loop variables are initialized outside of the loop (Before the label that the goto statement targets.) (i.e. set i 0).
  5. For macros with multiple lines, ensure they are enclosed in { }s
  6. 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[edit]

  1. Check your variable declarations. If you are setting a global variable use setglobal.
  2. Check what is in the variable as it goes through each stage use the macro message command (i.e. message "variablename is: " variable.)
  3. 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 .)