Lost in Nowhere's maps

Started by Lost in Nowhere, October 16, 2013, 11:26:45 PM

Previous topic - Next topic

Lost in Nowhere

#15
Aaaand the script for the spaceship broke  :-\
I'm not sure why it's doing it; it's whining about GetTerrainOverride taking stuff from an empty stack, but there are already two items that were just put there... which is causing it to go crazy and slowly die from running into something.
Oh, yeah, and it also won't let me exit the map in the editor without exiting the game entirely... not sure what's up with that...
Don't die! :)

warren

I would check your eyesight. On my machine, GetTerrainOverride as it appears on line 75 is actually spelled GetEnemyUnitsInRange, (which takes 3 args), and appears to be trying to take arguments appropriate for GetCoresWithVar.

As a rule, if the system starts glitching out, recompile scripts. That usually works.

Lost in Nowhere

That was... interesting that I didn't notice that. It wasn't whining about it, surprisingly (or, at least, I didn't see it).
I tried recompiling several times, which didn't work.
Don't die! :)

warren

There are a few things that can cause CW3 to crash, but I didn't see any of them in your spaceship script.

Lost in Nowhere

So, the tracelog that it spews out:
WARNING: Taking item from an empty stack: GETTERRAINOVERRIDE at line 94
WARNING: Taking item from an empty stack: GETTERRAINOVERRIDE at line 94
WARNING: Taking item from an empty stack: GETTERRAINOVERRIDE at line 227
WARNING: Taking item from an empty stack: GETTERRAINOVERRIDE at line 227
WARNING: Taking item from an empty stack: GETTERRAINOVERRIDE at line 227
WARNING: Taking item from an empty stack: XOR at line 227
WARNING: Taking item from an empty stack: GETTERRAINOVERRIDE at line 230
WARNING: Taking item from an empty stack: GETTERRAINOVERRIDE at line 230
WARNING: Taking item from an empty stack: GETTERRAINOVERRIDE at line 230
WARNING: Taking item from an empty stack: XOR at line 230

...repeated over and over and over, probably once per frame.
Don't die! :)

warren

How bizarre. I did not see those. Just for curiosity sake, how close does your ship get to the edge of the map? You may need to add bounds checking.

Lost in Nowhere

There is bounds checking; when it tries to go off the map, it just stops at the edge. The ship was about 20 tiles from the bottom-left corner.
Don't die! :)

warren

Well, I flew your ship around, and it works perfectly. (I cannot generate those errors.) The bounds checking still has problems, but that is mostly due to what looks like incompleteness. You are of course saving and loading from the editor after recompiling scripts? Do you have two nearly identical, yet different scripts? Did you post the wrong version of your script?

Lost in Nowhere

Once I get access to a computer back, I'm going to try just recreating the map and see if problems persist.
Don't die! :)

Lost in Nowhere

#24
Interestingly enough, remaking the map is causing it to work properly. Not sure what the problem was, but as long as it doesn't occur, it's great.

Although it still won't allow me to exit the map...
And an abhorrent amount of lag is being caused whenever the top edge of the map isn't visible... *sighs*
I really need to go through and look at that code...
Don't die! :)