openkore recognize if as a subroutine

All resolved question will be found here. It is recommended that you browse / search through this section first and see if your question has been answered before

Moderators: Moderators, Documentation Writers

Message
Author
dilminha
Noob
Noob
Posts: 18
Joined: 13 Mar 2017, 12:01
Noob?: No

openkore recognize if as a subroutine

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

		}

dilminha
Noob
Noob
Posts: 18
Joined: 13 Mar 2017, 12:01
Noob?: No

Re: openkore recognize if as a subroutine

#2 Post 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")

Mortimal
Developers
Developers
Posts: 389
Joined: 01 Nov 2008, 15:31
Noob?: No

Re: openkore recognize if as a subroutine

#3 Post by Mortimal »

OpenKore is buggy in call { } places.... use call x macro x {} instead
Please use pin function for uploading your file contents!

Locked