help me, Unknown identifier

Ask for help
Post Reply
mixers
Neophyte
Neophyte
Posts: 49
Joined: 03.10.2013 14:11

help me, Unknown identifier

Post by mixers »

Code: Select all

Program New;

const	
	shovel = $0F39; 
	box_1 = $40311147;        //ingot_box
	box_2 = $401B777E;
	shovel_box_1 = $401EF50F;  //shovel_box
	shovel_box_2 = $4070BC0D;   
	ingot = $1BF2;
	tinker_tool = $1EB8;

var 
	shovel_box : integer;
	box : integer;


begin
	repeat
	movexy(1202,1545,true,0,false);
	shovel_box := shovel_box_1;
	box := box_1;
	MakeShovel;
	movexy(1202,1528,true,0,false);
	shovel_box := shovel_box_2;
	box := box_2;
	MakeShovel;
             until Dead;
end.

procedure MakeShovel;
begin
     
        findtype(shovel,backpack);     
        if findcount > 10 then
        repeat
            findtype(shovel,backpack);     
            moveitem(finditem, 1, shovel_box, 0,0,0 ); 
            wait(500);
        until findcount = 0 ;   
       
        findtype(ingot ,backpack);  
        if FindQuantity < 10 then
            begin   
                useobject(box);    
                wait(1000);
                useobject(shovel_box);
                FindTypeEx(ingot,$0000,box,false);  
                grab(finditem,100);
            end;  
     
        findtype(tinker_tool ,backpack);      
        //addtosystemjournal(inttostr(findcount));
        if findcount < 3 then  
            begin              
                findtype(tinker_tool ,box); 
                if findcount < 3 then
                    begin     
                    findtype(tinker_tool ,backpack)
                    UseObject(finditem); 
                    wait(500); 
                    numgumpbutton(getgumpscount-1,8);
                    wait(500);
                    NumGumpButton(getgumpscount-1,23);   //make tinker_tool
                    wait(1000); 
                    end;
                if findcount >= 3 then
                    begin
                    grab(finditem,1);
                    end;
            end;     
        

        UseObject(finditem); 
        wait(500); 
        numgumpbutton(getgumpscount-1,8);
        wait(500);
        NumGumpButton(getgumpscount-1,72);   //make shovel  
        wait(1000);                            
 
        if not hidden then
            useskill('hiding');
  
        repeat
        	findtype(shovel,shovel_box); 
        	if findcount = 0 then
           	   useobject(box);
        	if findcount > 150 then
           	   wait(1000);
        	wait(1000); 
        until findcount >= 140
  
    
end;
system info: Unknown identifier 'MakeShovel'
Crome696
Novice
Novice
Posts: 67
Joined: 04.03.2012 18:57
Location: Germany
Contact:

Re: help me, Unknown identifier

Post by Crome696 »

Your issue is due following on your Scriptflow :

You declare variables, then the Body of Script then the functions. But you need first declare variables, then Functions and then the body. Another required thing is the terminology.

Like :

Code: Select all

Procedure b();
begin 
 a();
end;

Procedure a();
begin
 AddToSystemJournal('Calling A');
end;
If you work this way you will get problems, because b calls a and at this moment a is not known. So you must do like :

Code: Select all

Procedure a();
begin
 AddToSystemJournal('Calling A');
end;

Procedure b();
begin 
 a();
end;
So the functions are known before used. Same for Functions\Variables and such. First declare then call.
Stealth Development Team & Support
mixers
Neophyte
Neophyte
Posts: 49
Joined: 03.10.2013 14:11

Re: help me, Unknown identifier

Post by mixers »

thank Crome696.
i think the code must like this
in euo

Code: Select all

sub ***
return

main:
gosub ***

goto main
sub must before main
Crome696
Novice
Novice
Posts: 67
Joined: 04.03.2012 18:57
Location: Germany
Contact:

Re: help me, Unknown identifier

Post by Crome696 »

Well its like normal process.. You can enter the Train if you know howto.. So if someone say you should enter, your process must be known how to.

Keep this in Mind.

Another Sample : Bite the Red Apple. Before you know how to bite you should know what is "An Apple" and the Color "Red" ( Pseudo here for variables) then you must know how to bite ( Pseudo for subs) then you can execute "Bite Red Apple"
Stealth Development Team & Support
Post Reply