The Dink Network

Reply to variable limit and debug info

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
April 30th, 08:01 AM
custom_simon.gif
SimonK
Peasant He/Him Australia
 
PQ Redux is being tested (just by me)

And I'm creating various scripts that generate sprites etc for rocks falling in the machine mountain exit sequence once Dink has grabbed the scale.

As my scripts are looping the creation of the falling rocks I found that I have exceeded various variable limits (discovered this yesterday in the log.txt file because certain actions/procedures stopped working during the run) and then I thought I had fixed it, but tonight found that I was now exceeding sprite creation limit.

Is there a DinkC command that can check if all sprite available numbers are being used?

And looking at the log tonight I noticed that while the log seems to say out of var space, my debug lines which I have placed just before a spawning of falling rocks, say that I've not exceeded the variable limit of 249, as I have a check to kill the spawning script if the var_used() value is above that.

Below is the code showing the warning that I've used all 250 spaces but the var_used is returning a different value that is less, haven't changed screens between looping the rock creation.

** adding mobile Skard script to sprite 20 **
** adding mobile Cthullos script to sprite 21 **
*** rockfall spawned on screen 447 - 106 variables used***
*** Rockfall loop start - 114 variables used***
** adding mobile Skard script to sprite 22 **
** adding mobile Cthullos script to sprite 23 **
ERROR: Out of var space, all 250 used.
ERROR: (var equals2) Unknown var &pcrap in brock offset 661.
ERROR: Out of var space, all 250 used.
ERROR: (var equals2) Unknown var &hold in brock offset 1634.
ERROR: Out of var space, all 250 used.
ERROR: Out of var space, all 250 used.
ERROR: (var equals2) Unknown var &damrock in brock offset 311.
ERROR: (var equals2) Unknown var &damrock in brock offset 329.
ERROR: (var equals2) Unknown var &pcrap in brock offset 661.
ERROR: (var equals2) Unknown var &pcrap in brock offset 661.
ERROR: (var equals2) Unknown var &pcrap in brock offset 661.
ERROR: (var equals2) Unknown var &pcrap in brock offset 661.
ERROR: (var equals2) Unknown var &pcrap in brock offset 661.
ERROR: (var equals2) Unknown var &pcrap in brock offset 661.
ERROR: (var equals2) Unknown var &pcrap in brock offset 661.
ERROR: (var equals2) Unknown var &pcrap in brock offset 661.
ERROR: (var equals2) Unknown var &pcrap in brock offset 661.
** creating more blue rocks on screen 447 **
*** Rockfall loop start - 145 variables used***

and tonight, I get the out of sprites error...
so I'm killing off the rockfall script once I know that Dink has failed to reach the exit in time and thus can fill the screen with rocks, since I can't have both rock spawning scripts running at the same time.

I could just create on big sprite with all the rocks on it and move that down - which may be the better solution - but I like the rocks killing off all character sprites still on the screen.

** creating more blue rocks on screen 734 **
*** Rockfall loop start - 159 variables used***
** reaching end of music que **
** blrckill.c spawned DINK 216 life **
** checking sprite 6 is frozen from decrunf.c **
** row 1 of rocks created - 1 pass **
** row 2 of rocks created - 1 pass **
** checking sprite 6 is frozen from decrunf.c **
** row 3 of rocks created - 1 pass **
** row 4 of rocks created - 1 pass **
** checking sprite 6 is frozen from decrunf.c **
** row 5 of rocks created - 1 pass **
** have done 2 passes through rock creation **
Out of sprites, can't create!
Out of sprites, can't create!
Out of sprites, can't create!
Out of sprites, can't create!
Out of sprites, can't create!
Out of sprites, can't create!
Out of sprites, can't create!