Pages: 1
  Print  
Author Topic: Inherited Variables Inaccessible by Other Objects  (Read 1024 times)
Offline (Unknown gender) jimn346
Posted on: July 11, 2014, 09:05:42 pm
"Guest"


Email
There is a problem with the inheritance system. When an object1 attempts to access a variable belonging to object2 and the variable was defined by object2's parent, 0 is returned.

For example.

objParent | Create Event:
variable = 32;

objChild is the child of objParent.

objOther | Draw Event:
draw_text(4, 4, string(oChild.variable));

A 0 is drawn to the screen when it should be a 32.

GitHub Issue
Logged
Offline (Male) Goombert
Reply #1 Posted on: July 11, 2014, 09:31:05 pm

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
Thanks Jimn, I can't really comment to much on it right now without investigating deper. But it is probably something to do with the cast of inst_t, these are compiler issues that need worked out by Dreamland. But I do know some locals do work under certain scopes, such as the child, the child should definitely be able to access the local. It would also be useful to test without the parent.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Pages: 1
  Print