GlobalVariable problem

 

Hi,

My problem:

Why happend?

Uncertainty, that occurs when good.

Thanks in advance for your time and assistance. Bye

Alert:

void start()  
 {
  if (!not_first_start)
   {
    GlobalVariableSet("T_AutoClose", 0);
    GlobalVariableSet("T_OnlyClose", 0);
   }

........
and in other i request value:

int Total=GlobalVariablesTotal();
for(int pos=1; pos<Total+1; pos++)
   {
    Alert(pos," ",GlobalVariableName(pos)," ", GlobalVariableGet(GlobalVariableName(pos)));
    if (GlobalVariableName(pos)=="") 
     {
      error=GetLastError(); // hiba nullázás  
      Alert("Orders_NoTrLCl_Display hiba eleje: (",Symbol(),"  ",error,"): ",ErrorDescription(error));
      
     }
.....
and alert, 4058 global variable not found


 
ttechnik:

Hi,

My problem:

Why happend?

Uncertainty, that occurs when good.

Thanks in advance for your time and assistance. Bye

The first position should be 0 not 1 . . . so your loop is wrong, thy this . . .

for(int pos = 0; pos < Total; pos++)
Reason: