Page 1 of 1
error with macros.
Posted: 05 Mar 2014, 03:23
by sanasuke
this is my macros,
Code: Select all
automacro fcp {
console /\[dist=(.*)\] (.*) \((\d+)\): (\*Good Game\s\d\*|fcp)$/
exclusive 1
call {
$distance = $.lastMatch1
$namaPlayer = $.lastMatch2
$playerID = $.lastMatch3
$playerguild = @eval (exists $::players{$::playersID[$playerID]}->{guild} ? $::players{$::playersID[$playerID]}->{guild}{name} : 'null')
#Guild Name
$guild = Cross
$guild1 =
$guild2 =
$guild3 =
if ($playerguild == $guild) goto oke
if ($playerguild == $guild1) goto oke
if ($playerguild == $guild2) goto oke
if ($playerguild == $guild3) goto oke
goto lain
:oke
do sp 479 $playerID 5
pause 1
goto end
:lain
do e omg
do c Who You
:end
}
}
please help me with auto fcp, i cant fcp it show this error ,
Re: error with macros.
Posted: 05 Mar 2014, 18:04
by Kaspy
The image is very small... But, seeing only the macro code, I believe the error is this:
It is mandatory to provide the value to be placed in the variable. Can not leave blank the term after the equal sign
Its another matter... this macro messy. A more organized and equivalent version
Code: Select all
automacro fcp {
console /\[dist=(.*)\] (.*) \((\d+)\): (\*Good Game\s\d\*|fcp)$/
exclusive 1
call {
$distance = $.lastMatch1
$namaPlayer = $.lastMatch2
$playerID = $.lastMatch3
$playerguild = @eval (exists $::players{$::playersID[$playerID]}->{guild} ? $::players{$::playersID[$playerID]}->{guild}{name} : 'null')
#Guild Name
$guild = Cross
#$guild1 =
#$guild2 =
#$guild3 =
if ($playerguild == $guild || $playerguild == $guild1 || $playerguild == $guild2 || $playerguild == $guild3) {
do sp 479 $playerID 5
pause 1
goto end
} else {
do e omg
do c Who You
}
}
}
Re: error with macros.
Posted: 05 Mar 2014, 21:17
by sanasuke
the image small? well i can see the image i post is big, well i use your macros,still got same error,i still dont know why still error.
if you cant see the image i wirte the error
Code: Select all
[macro] fcp.call error: error in 3:@eval (exists $::players{$::playersID[$playerID]}->{guild} ? $::players{$::playersID[$playerID]}->{guild}{name} : 'null') failed.
Re: error with macros.
Posted: 05 Mar 2014, 22:55
by Kaspy
Not sure, but I believe that if replace
Code: Select all
$playerguild = @eval (exists $::players{$::playersID[$playerID]}->{guild} ? $::players{$::playersID[$playerID]}->{guild}{name} : 'null')
to
Code: Select all
$playerguild = @eval (exists $::players{$::playersID[$::playerID]}->{guild} ? $::players{$::playersID[$::playerID]}->{guild}{name} : 'null')
will solve the problem
If this does not solve the problem with this line, do not know what can be.
Re: error with macros.
Posted: 07 Mar 2014, 01:44
by sanasuke
i still cant fcp, still get same error
Re: error with macros.
Posted: 07 Mar 2014, 05:36
by c4c1n6kr3m1
is the guild's name using ascii or weird character, it can make problem,once i've experience with "white space look's alike" 0255?
your code seems correct, i've used it once
what will happen if you change directly to your player index that is 0 ; Erico (0) to
$playerID = 0
if stay still, try to change
Code: Select all
log dist $distance name $namaPlayer index $playerID
$playerguild = @eval (exists $::players{$::playersID[$::Macro::Data::varStack{playerID}]}->{guild} ? $::players{$::playersID[$::Macro::Data::varStack{playerID}]}->{guild}{name} : 'null')