(0.3.7 R2) Server Variable System Bug
#1

The problem has been fixed in R2-1

Quote:
Fixed in 0.3.7 R2-1:
Hello, im not sure of this but the issue is this

I tried this
PHP Code:
    printf("start %i"GetSVarsUpperIndex());
    
SetSVarInt("asd"1);
    
printf("middle %i"GetSVarsUpperIndex());
    
DeleteSVar("asd");
    
printf("end %i"GetSVarsUpperIndex()); 
And the result is this:
Code:
[20:45:37] start 0
[20:45:37] middle 1
[20:45:37] end 1
It looks like the first Server Variable created can't be deleted.

And for another code in 0.3.7 R2-1:
PHP Code:
    new vName[16];
    
printf("start %i"GetSVarsUpperIndex());
    
printf("------------------------------");
    for(new 
1<= 9i++)
    {
        
format(vName,16,"var%i"i);
        
SetSVarInt(vName999);
        
printf("%i,%s"GetSVarsUpperIndex(), vName);
    }
    
printf("------------------------------");
    for(new 
1<= 9i++)
    {
        
format(vName,16,"var%i"i);
        
DeleteSVar(vName);
        
printf("%i,%s"GetSVarsUpperIndex(), vName);
    }
    
printf("------------------------------");
    
printf("end %i"GetSVarsUpperIndex()); 
results:
Code:
[10:51:03] start 0
[10:51:03] ------------------------------
[10:51:03] 1,var1
[10:51:03] 2,var2
[10:51:03] 3,var3
[10:51:03] 4,var4
[10:51:03] 5,var5
[10:51:03] 6,var6
[10:51:03] 7,var7
[10:51:03] 8,var8
[10:51:03] 9,var9
[10:51:03] ------------------------------
[10:51:03] 9,var1
[10:51:03] 9,var2
[10:51:03] 9,var3
[10:51:03] 9,var4
[10:51:03] 9,var5
[10:51:03] 9,var6
[10:51:03] 9,var7
[10:51:03] 9,var8
[10:51:03] 0,var9
[10:51:03] ------------------------------
[10:51:03] end 1
The Server Variables are not deleted until end.
What do you think?

Reply
#2

Did you update to 0.3.7 R2-1?
Reply
#3

This is fixed in R2-1.

Quote:
Originally Posted by Kalcor
- Fixes an index problem with PVars and SVars where *GetUpperIndex would return 1 when all vars had been deleted.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)