V
VampireJesus
Guest
So I downloaded the newest version last night, and have experienced a few bugs... IDE Version 2.0.2.44, Runtime 2.0.1.27
The first is with the debugger. All of my user defined variables are displaying as <unknown>
Built in variables display correctly. This makes tracking what's happening a little more difficult
Secondly, and I don't know if this is strictly with the newest version... I trying to find a problem in my code, and so I had commented out the statements in my draw event (since it was crashing there). I then set a break point in the create event of the same object. But when I tried to reset the program, it seemed to skip over the create event altogether. So, then I went back and put a break point in my controller object, which creates my other objects, so I could watch what was happening. When, and only when, I did this, I was able to see that it did go through the create event, but the source view in the debugger would show the draw event for that object. Meanwhile, I could see in the instance pane that variables were being set, but I couldn't follow along. So, as a test, I went and completely deleted the draw event (since I wasn't using it at the moment anyway, and it only had one statement). After that, I could properly watch the code progress through the create event.
Third, when I was having the problem of the variables not displaying properly in the debugger, I went back to a project I had started a few days ago, and hadn't touched to see if the problem existed there. And, the last time I had worked on this older project (which was before updating), it did not have any compile errors, but when I launched it today, it had issues.
So, this is a section of my controller object's create event:
And here's a section of the Step event:
So, in the create event you can see I have a variable called load_radius. And, in the for loop in my step event, I refer to said variable. Only, suddenly, it's reading it like a local variable that hasn't been defined yet.
Now, in the Step event, you'll see I have chunk_x =... and chunk_y =...
So, later in the step event, I have:
And it's getting stuck on var chunk_x = obj_controller.chunk_x. So, I don't know if this one has to do with chunk_x being an event level variable instead of an object level variable, but in both of these cases, this project was compiling before the update. Now, if I define a load_radius variable before my for loop, and I comment out the whole with section, I don't get any more errors, so some of this might simply require re-thinking how it's coded (which would be nothing new for me), but the load_radius thing in particular seems odd.
The first is with the debugger. All of my user defined variables are displaying as <unknown>
Built in variables display correctly. This makes tracking what's happening a little more difficult
Secondly, and I don't know if this is strictly with the newest version... I trying to find a problem in my code, and so I had commented out the statements in my draw event (since it was crashing there). I then set a break point in the create event of the same object. But when I tried to reset the program, it seemed to skip over the create event altogether. So, then I went back and put a break point in my controller object, which creates my other objects, so I could watch what was happening. When, and only when, I did this, I was able to see that it did go through the create event, but the source view in the debugger would show the draw event for that object. Meanwhile, I could see in the instance pane that variables were being set, but I couldn't follow along. So, as a test, I went and completely deleted the draw event (since I wasn't using it at the moment anyway, and it only had one statement). After that, I could properly watch the code progress through the create event.
Third, when I was having the problem of the variables not displaying properly in the debugger, I went back to a project I had started a few days ago, and hadn't touched to see if the problem existed there. And, the last time I had worked on this older project (which was before updating), it did not have any compile errors, but when I launched it today, it had issues.
So, this is a section of my controller object's create event:
Code:
global.grid2 = 16; //tile size
global.grid1 = 8; //subtile size
global.wrap_x = true;
global.wrap_y = true;
chunk_size = 8; //number of tiles in a chunk
chunk_w = room_width div (chunk_size * global.grid2);
chunk_h = room_height div (chunk_size * global.grid2);
if global.wrap_x chunk_w += 2;
if global.wrap_y chunk_h += 2;
load_radius = 1;
chunk_grid = ds_grid_create(chunk_w,chunk_h);
ds_grid_set_region(chunk_grid,0,0,chunk_w,chunk_h,noone);
Code:
chunk_x = obj_player.x div (chunk_size * global.grid2);
chunk_y = obj_player.y div (chunk_size * global.grid2);
if global.wrap_x chunk_x += 1;
if global.wrap_y chunk_y += 1;
for (j = chunk_y - (load_radius * (chunk_y > 0)); j <= chunk_y + (load_radius * ((chunk_y + load_radius) < chunk_h)); j++) {
for (i = chunk_x - (load_radius * (chunk_x > 0)); i <= chunk_x + (load_radius * ((chunk_x + load_radius) < chunk_w)); i++) {
Now, in the Step event, you'll see I have chunk_x =... and chunk_y =...
So, later in the step event, I have:
Code:
with (obj_chunk) {
var chunk_x = obj_controller.chunk_x;
var chunk_y = obj_controller.chunk_y;
var load_radius = obj_controller.load_radius;