Page 1 of 1

openkore recognize if as a subroutine

Posted: 24 May 2017, 10:38
by dilminha
my code was working perfectly but now it says:

[macro] start.call error: error in 13: Unrecognized --> if <-- Sub-Routine

I think that, somehow, openkore is trying to do it:

call if


here's the begin of my code:

automacro start {

Code: Select all

	location not ordeal_3-2
	call {

		
		if ($.map == "aldebaran") {		

			call dead
		
		}

		
		if ($.zeny <= 200000) {
		
			call esperaz
		
		}

		if (@invamount (Credit) > 0) {

			call givecred

		}

Re: openkore recognize if as a subroutine

Posted: 24 May 2017, 12:13
by dilminha
forget i found the error

it seems that openkore can't compare a variable to a value that has underscore "_" for example:

Code: Select all



if($.map == "prt_in")

Re: openkore recognize if as a subroutine

Posted: 24 May 2017, 15:05
by Mortimal
OpenKore is buggy in call { } places.... use call x macro x {} instead