error with macros.

All about the macro plugin can be found in this forum. This forum is intended for the macro plugin only.

Moderator: Moderators

Message
Author
sanasuke
Noob
Noob
Posts: 3
Joined: 05 Mar 2014, 03:20
Noob?: Yes

error with macros.

#1 Post 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 , Image

Kaspy
Halfway to Eternity
Halfway to Eternity
Posts: 398
Joined: 08 Jun 2012, 15:42
Noob?: No
Location: Brazil

Re: error with macros.

#2 Post by Kaspy »

The image is very small... But, seeing only the macro code, I believe the error is this:

Code: Select all

$guild1 = 
$guild2 = 
$guild3 = 
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
		}
	}
}
Image

sanasuke
Noob
Noob
Posts: 3
Joined: 05 Mar 2014, 03:20
Noob?: Yes

Re: error with macros.

#3 Post 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.

Kaspy
Halfway to Eternity
Halfway to Eternity
Posts: 398
Joined: 08 Jun 2012, 15:42
Noob?: No
Location: Brazil

Re: error with macros.

#4 Post 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.
Image

sanasuke
Noob
Noob
Posts: 3
Joined: 05 Mar 2014, 03:20
Noob?: Yes

Re: error with macros.

#5 Post by sanasuke »

i still cant fcp, still get same error

c4c1n6kr3m1
The Way Of Human
The Way Of Human
Posts: 150
Joined: 24 Mar 2012, 04:13
Noob?: Yes

Re: error with macros.

#6 Post 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')

Post Reply