Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,295 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Call function error??? #327255
06/05/10 15:34
06/05/10 15:34
Joined: Aug 2005
Posts: 238
Caermundh Offline OP
Member
Caermundh  Offline OP
Member

Joined: Aug 2005
Posts: 238
I have the following algorithm(s):

var update_tagarray[1000];
var set_nexttag[1000];
var set_firsttag[1000];
var curr_taghandle[1000];

function update_tagarray(var tag_num)
{ object_inst* tag_instance;
var tag_array[5000];
var count;
var count2;
var instance_ptr;
var curr_tagindex = 0;
set_firsttag[tag_num] = 0;
set_nexttag[tag_num] = 0;
update_tagarray[tag_num] = 0;
while(1)
{ if(update_tagarray[tag_num])
{ update_tagarray[tag_num] = 0;
count = 0;
tag_instance = first_instance;
while(tag_instance)
{ if(tag_instance->tag==tag_num)
{ if(count<5000)
{ count2 = 0;
while(instance_handles[count2]!=tag_instance) { count2 += 1; }
tag_array[count] = count2;
count += 1;
}
}
tag_instance = tag_instance->next;
}
while(count<5000)
{ tag_array[count] = 0;
count += 1;
}
}
if(set_firsttag[tag_num])
{ curr_tagindex = 0;
curr_taghandle = 0;
if(tag_array[curr_tagindex])
{ curr_taghandle[tag_num] = tag_array[curr_tagindex];
}
set_firsttag[tag_num] = 0;
}
if(set_nexttag[tag_num])
{ curr_tagindex += 1;
curr_taghandle = 0;
if(curr_tagindex<5000)
{ if(tag_array[curr_tagindex])
{ curr_taghandle[tag_num] = tag_array[curr_tagindex];
}
}
set_nexttag[tag_num] = 0;
}
wait(1);
}
}

function get_instance_tag(STRING* tag_str)
{ var count = 1;
while(count<1000)
{ if((curr_tags.pstring)[count])
{ if(str_cmp((curr_tags.pstring)[count],tag_str))
{ break;
}
}
count += 1;
}
if(count==1000)
{ count = 1;
while((curr_tags.pstring)[count])
{ count += 1;
}
(curr_tags.pstring)[count] = str_create(tag_str);
update_tagarray(count);
}
return(count);
}

When I run the program the compiler gives me an error message: "Call function @temp_02789 error".

The error message is being produced by "update_tagarray(count);" in get_instance_tag() - if i comment that line out, the program runs with no errors. Why is this one function call producing an error? What does this error message mean?

Re: Call function error??? [Re: Caermundh] #327257
06/05/10 15:38
06/05/10 15:38
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
uhm.. yeah..

var update_tagarray[1000];
and
function update_tagarray(var tag_num)


Don´t use a name twice for var, function, caction, struct..etc..


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Call function error??? [Re: Espér] #327260
06/05/10 15:41
06/05/10 15:41
Joined: Aug 2005
Posts: 238
Caermundh Offline OP
Member
Caermundh  Offline OP
Member

Joined: Aug 2005
Posts: 238
ohhhhhh....D'OH!!

I totally missed that....been looking at this thing too long....LOL

thanks!


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1