Troubleshooting macros

From CLUMP
Revision as of 03:49, 25 August 2010 by Mwadmin (talk | contribs) (Created page with "==Error messages and possible solutions (in alphabetical order):== ===*FILE* not found.=== When it can occur: When logging into game, or reloading macros.<br> Try this/solution:...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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 - try copying (F2 to edit, CTRL+C to copy) & pasting in file name from finder or explorer.
  • 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 clanlord/data/macros folder.

Option not recognized.

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

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

  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

  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 .)