Gee, that's helpful... where at? what file and what line? Any idea?omper wrote:also it will cause crash ..
Some kind of description of what happened would help.
Moderator: MacroQuest Developers
Code: Select all
Sub Event_Chat (string ChatType,string ChatSender,string ChatText)
Code: Select all
Sub Event_Chat(string ChatType,string ChatSender,string ChatText)
You sure about that? I only found your instance of a space between the sub name and the (. Didn't find it anywhere else.bollox wrote:Small syntax error prevents genbot from grabbing incoming commands:should be:Code: Select all
Sub Event_Chat (string ChatType,string ChatSender,string ChatText)..there shouldn't be a space between "Event_Chat" and the opening parenthesis.Code: Select all
Sub Event_Chat(string ChatType,string ChatSender,string ChatText)
This type of error is duplicated throughtout the macro.

Code: Select all
botcombat.inc(319): Sub CheckAggressive (string AggroText)
botcore.inc(348): Sub Event_Chat (string ChatType,string ChatSender,string ChatText)
botcore.inc(371): Sub Event_SelfEcho (string EchoText)
botcore.inc(376): Sub ExecCommand (string CommandText)
botcore.inc(462): Sub Hitobst (int HoldTime)
botcore.inc(670): Sub Event_timer (string TimerName,string OldValue)
botcore.inc(705): Sub StandardTarget (string TargetName)
botcore.inc(733): Sub Do-assist (string AssistName)
botcore.inc(830): Sub Do-invite (string TargetName)
botcore.inc(924): Sub Do-moveto (string TargetName)
botcore.inc(1020): Sub Do-consent (string TargetName)
botcore.inc(1055): Sub Do-verbosity (int NewVerbosity)
botcore.inc(1073): Sub Do-rmod (int RangeMod)
botcore.inc(1082): Sub Do-rset (int NewFastMin,int NewRangeMin,int NewRangeMax,int NewFastRange)
botcore.inc(1097): Sub Do-anchorradius (int NewRadius)
bothealer.inc(285): Sub CastHeal (int TarID,string HealSpell,string castMsg)
bothealer.inc(310): Sub Patchheal (int TarID)
bothealer.inc(330): Sub PallyHeal (int TarID)
botspell.inc(196): Sub SpellSub (string SpellName)
botspell.inc(449): Sub Do-sn (string newSpell)
botspell.inc(465): Sub Do-loadlist (string Spellset)
Code: Select all
Sub Event_SelfEcho(string EchoText)
/varset MasterName ${Me.ClearName}
/call ExecCommand ${EchoText}
/return
Code: Select all
${Me.ClearName}
Code: Select all
${Me.CleanName}
Code: Select all
next counter
Code: Select all
/next counter
Code: Select all
/varcat myBuffs " ${Me.Buff[${$counter}]}"
Code: Select all
/varcat myBuffs " ${Me.Buff[${counter}]}"
Code: Select all
/next tempvar
Code: Select all
/next counter
Yes, that is a problem...fez_ajer wrote:If the whitespace between the Sub name and the parenthesized argument list is a problem I counted a good 10-15 of them scattered throughout the .inc files. I should be able to test in-game in an hour or so.
My files are modified so the line numbers are slightly off:Code: Select all
botcombat.inc(319): Sub CheckAggressive (string AggroText) botcore.inc(348): Sub Event_Chat (string ChatType,string ChatSender,string ChatText) botcore.inc(371): Sub Event_SelfEcho (string EchoText) botcore.inc(376): Sub ExecCommand (string CommandText) botcore.inc(462): Sub Hitobst (int HoldTime) botcore.inc(670): Sub Event_timer (string TimerName,string OldValue) botcore.inc(705): Sub StandardTarget (string TargetName) botcore.inc(733): Sub Do-assist (string AssistName) botcore.inc(830): Sub Do-invite (string TargetName) botcore.inc(924): Sub Do-moveto (string TargetName) botcore.inc(1020): Sub Do-consent (string TargetName) botcore.inc(1055): Sub Do-verbosity (int NewVerbosity) botcore.inc(1073): Sub Do-rmod (int RangeMod) botcore.inc(1082): Sub Do-rset (int NewFastMin,int NewRangeMin,int NewRangeMax,int NewFastRange) botcore.inc(1097): Sub Do-anchorradius (int NewRadius) bothealer.inc(285): Sub CastHeal (int TarID,string HealSpell,string castMsg) bothealer.inc(310): Sub Patchheal (int TarID) bothealer.inc(330): Sub PallyHeal (int TarID) botspell.inc(196): Sub SpellSub (string SpellName) botspell.inc(449): Sub Do-sn (string newSpell) botspell.inc(465): Sub Do-loadlist (string Spellset)
Yeah, found those and corrected.bollox wrote:botcore.ini: in function Sub ExecCommand:needs a preceding "/":Code: Select all
next counterCode: Select all
/next counter

Code: Select all
/if (${CheckName} && ${ChatText.Arg[1].NotEqual[${Me.CleanName}]}[color=red])[/color] /return
Code: Select all
/if [color=red]([/color]${IgnGroupList.Find[${ChatText.Arg[1]}]}[color=red])[/color] /return
Code: Select all
/if (${FollowMode}=[color=red]=[/color]3) {
Code: Select all
Sub ExecCommand(string CommandText)
/declare CommandLen int local
/declare counter int local
/varset CurrCommand ${CommandText.Arg[1]}
/varcalc CommandLen ${CommandText.Length}+1
/varset CommandParam
/if (${CommandText.Length} > ${CommandLen}) /varset CommandParam ${CommandText.Right[-${CommandLen}]}
/if (${Defined[botcorearray]}) {
/for counter [color=red]1[/color] to ${botcorearray.Size[2]}
/if (${CurrCommand.Equal[${botcorearray[1,${counter}]}]}) {
/call ${botcorearray[2,${counter}]} ${CommandParam}
}
/next counter
}
/if (${Defined[botcombatarray]}) {
/for counter [color=red]1[/color] to ${botcombatarray.Size[2]}
/if (${CurrCommand.Equal[${botcombatarray[1,${counter}]}]}) {
/call ${botcombatarray[2,${counter}]} ${CommandParam}
}
/next counter
}
/if (${Defined[botspellarray]}) {
/for counter [color=red]1[/color] to ${botspellarray.Size[2]}
/if (${CurrCommand.Equal[${botspellarray[1,${counter}]}]}) {
/call ${botspellarray[2,${counter}]} ${CommandParam}
}
/next counter
}
/if (${Defined[botHealarray]}) {
/for counter [color=red]1[/color] to ${botHealarray.Size[2]}
/if (${CurrCommand.Equal[${botHealarray[1,${counter}]}]}) {
/call ${botHealarray[2,${counter}]} ${CommandParam}
}
/next counter
}
/if (${Defined[botTogglearray]}) {
/for counter [color=red]1[/color] to ${botTogglearray.Size[2]}
/if (${CurrCommand.Equal[${botTogglearray[1,${counter}]}]}) {
/call SetToggle ${counter} ${CommandParam}
}
/next counter
}
/if (${Defined[shortcutsarray]}) {
/for counter [color=red]1[/color] to ${ShortCuts}
/if (${CurrCommand.Equal[${shortcutsarray[1,${counter}]}]}) {
/call ShortCut ${counter} ${CommandParam}
}
/next counter
}
/if (${Defined[BotPersonalsarray]}) {
/for counter [color=red]1[/color] to ${BotPersonalsarray.Size[2]}
/if (${CurrCommand.Equal[${BotPersonalsarray[1,${counter}]}]}) {
/call ${BotPersonalsarray[2,${counter}]} ${CommandParam}
}
/next counter
}
/return
Code: Select all
Sub PalHealChk
/declare tempvar int local 1
/if (!${IsPally}) /return
/if (!${IsHealer}) /return
/for tempvar 1 to ${Group}
/doevents
/if ((${Group[${tempvar}].PctHPs}<${PalHealPct})&&(${Group[${tempvar}].State.NotEqual[DEAD]})) /call PallyHeal ${Group[${tempvar}].ID}
/next tempvar
/return
Code: Select all
/target [color=red]${[/color]FollowTarget[color=red]}[/color]
Code: Select all
/varset Afollow [color=red]1[/color]
Code: Select all
Sub Fastback
/varset ObstacleCheck 0
/varset MyLastXLoc ${Me.X}
/varset MyLastYLoc ${Me.Y}
:fastbackloop
/doevents
/if (!${Target.ID}) {
/varset Combatstatus 0
/Keypress [color=red]BACK[/color]
/if (${Me.Combat}) /attack off
/return
}
/if (!${Me.Standing}) /stand
/face fast
/if (${Target.Distance}<${FastMin}) /keypress [color=red]BACK[/color] hold
/if (${Target.Distance}>=${FastMin}) {
/Keypress [color=red]BACK[/color]
/return
}
/if (${ObstacleCheck}>=8) {
/if ((${MyLastXLoc}==${Me.X})&&(${MyLastYLoc}==${Me.Y})) {
/if (${Math.Rand[100]}>50) {
/Keypress STRAFE_LEFT hold
/delay 1
/Keypress STRAFE_LEFT
/return
} else {
/Keypress STRAFE_RIGHT hold
/delay 1
/Keypress STRAFE_RIGHT
/return
}
}
/varset MyLastXLoc ${Me.X}
/varset MyLastYLoc ${Me.Y}
}
/varcalc ObstacleCheck ${ObstacleCheck}+1
/goto :fastbackloop
/return
|Fastmove
|Called by Rangesub for when mob is more than /keypress distance away.
|Usage: /call Fastmove
Sub Fastmove
/varset ObstacleCheck 0
/varset MyLastXLoc ${Me.X}
/varset MyLastYLoc ${Me.Y}
:fastmoveloop
/doevents
/if (!${Target.ID}) {
/varset Combatstatus 0
/keypress [color=red]FORWARD[/color]
/if (${Me.Combat}) /attack off
/return
}
/if (!${Me.Standing}) /stand
/face fast
/if (${Target.Distance}>${FastRange}) /keypress [color=red]FORWARD[/color] hold
/if (${Target.Distance}<=${FastRange}) {
/keypress [color=red]FORWARD[/color]
/return
}
/if (${ObstacleCheck}>=30) {
/call Detectobst
/varset ObstacleCheck 0
}
/if (${Target.Distance}>=${Math.Calc[${FastRange}*3]}) /varcalc ObstacleCheck ${ObstacleCheck}+1
/goto :fastmoveloop
/return
Code: Select all
/if (${PetOnAssist}) {
/if (!${Me.Standing}) /stand
/call Delay 5
/pet attack
/call Delay 5
/if ((${SitAfterCast})&&(!${Me.Sitting})) /varset SitTimer ${DelayBeforeSit}
}

Code: Select all
[color=red]/[/color]next counter