View Single Post
  #16  
Old 09-03-2014, 10:38 PM
Jakov_the_Jakovasaur Jakov_the_Jakovasaur is offline
Deleted by Darlene159
Jakov_the_Jakovasaur's Avatar
Join Date: Sep 2013
Location: Deleted by Darlene159
Posts: 360
Jakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud ofJakov_the_Jakovasaur has much to be proud of
Quote:
Originally Posted by Jakov_the_Jakovasaur View Post
the problem described by fowlplay4 also seems to be happening for player.attr[] values with mac users, and likewise i do not use mac so cant confirm or debug it
i just noticed now there that there is actually not a bug reading such strings which begin with a number within player attributes for the new mac client, it simply appeared to be the case because during my attempts to debug a problem the real bug turned out to be that a string value was being treated as if it were NULL

example:

PHP Code:
function onCreated() 
  
this.hash = new TStaticVar();

function 
something() {
  
//set these attributes just for the sake of an example
  
player.attr[5] = "1 3 0.05";
  
player.attr[6] = "2 4 0.1";
  
player.attr[7] = "0 0";

  
//lets just pretend that this is defined as an array
  
temp.save this.hash.(@ player.account);

  
temp.player.attr[5] @ player.attr[6] @ player.attr[7];

  echo(
temp.h); //outputs: 1 3 0.052 4 0.10 0

  /*is never true because temp.save[6] starts as NULL
  and temp.h is treated as NULL when it actually isnt*/
  
if (temp.!= temp.save[6]) {
    
this.doSomethingElse(player);
    
temp.save[6] = temp.h;
    
this.hash.(@ player.account) = temp.save;
  }

  echo(
temp.== NULL); //outputs: 1


this example should show that there is a bug with concatenating strings which consist of numbers in such a way, as temp.h is being treated as if it is NULL when it is not NULL
__________________
This signature has been deleted by Darlene159.
Reply With Quote