# Identify Code Errors

Finding errors in a perticular part of a macro can be a challenge but never impossible. After an unsuccessfull attempt to get the macro to run an eror message was generated. "Due to complete misuse of the String Top-Level Object, it has been removed."

Here we look at two pieces from the Cleric Bot macro.

/varset Classes ${String\[${SpellBuff\[${i},2]}].Count\[,]}

`/if (${Spawn[${sID}].Class.Name.Equal[${String[${SpellBuff[${i},2]}].Arg[${h},,]}]}) {`

Since ${String\[ is no longer valid attempt to remove and re-run the macro. With $String\[ removed the error is gone, but now a new error is present.

No such 'bool' member 'Arg' ClericBot.mac\@2031 (singlebuffs): /if (${Spawn\[${sID}].Class.Name.Equal\[${String\[${SpellBuff\[${i},2]}].Arg\[${h},,]}]}) { ClericBot.mac\@789 (Main): /if (${Me.PctMana}>40 /if........./call SingleBuffs Unparsable in Calculation

Following the code the macro is testing predetermined conditions then calling the single buff routine. Once that routine is called the new error is generated.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://macroquest.gitbook.io/macroquest/documentation/identify-code-errors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
