View Single Post
  #25  
Old 08-22-2014, 04:40 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: 354
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 Restraint View Post
I reported this a long time ago, when I ran into this situation with an account of mine ("100Zero100") getting passed server-to-client seemingly as "100"

The problem involves datatyping.

Although Graal does not have explicit datatypes, it does have IMPLICIT datatypes, which can be grabbed or corrected by using @.

For example:

PHP Code:
temp.nil;
temp."";
if (
== b) { // true
if (@== @b) { // false 
The former is true because null int and null string are the same when they're just "blob" datatypes. The latter is false because null int and null string are not the same when their datatype is invoked!

To fix your problem, simply put an @ before the attr.

Example:

PHP Code:
function onCreated() {
 
this.attr[5] = "100Zero100";
}
//#CLIENTSIDE
function onCreated() {
 
sleep(1);
 
this.chat this.attr[5];

Chat sets to: 100

PHP Code:
function onCreated() {
 
this.attr[5] = "100Zero100";
}
//#CLIENTSIDE
function onCreated() {
 
sleep(1);
 
this.chat = @this.attr[5];

Chat sets to: 100Zero100

Hope that helps to shed some light and resolve these types of bugs.
hello!

the problem i mentioned previously involved writing to an attr rather than reading

as for the original problem i mentioned where it does involve reading an attr, usually using the concatenate method does fix it however even that fails in the latest mac client
__________________
This signature has been deleted by Darlene159.
Reply With Quote