Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Data Not Working?

Author
Message
MPQC
15
Years of Service
User Offline
Joined: 7th Sep 2009
Location:
Posted: 14th Sep 2009 00:18
Well. I was looking at one of the codes in the codebase, and was just modifying it a bit. First, let me show you the code I've got.



And TestLevel1Data is:



To sum it up quickly, it creates a "level" of blocks where the numbers are. So #1 represents a plain block, #2 is the spawn point for the camera, and #3 is a colored block. But, whenever I do it, it doesn't seem to work in the way I want.

For instance, as the code is right now, only blocks with 1's will spawn. 3's will not spawn. But, if I change the code quickly:



(Basically, I've swapped what block spawns what: "1" now spawns "3", and vice versa.) So, under that quick change, What used to work now no longer works, and vice versa.

I'm wondering how I can fix this. I'm taking a guess that when it's doing the math, it recognizes #3 as the x, and does 3 x 50, rather then 1 x 50. But if that were true, I would still see the object being spawned, but higher in the air, which I don't. So what's wrong with the code, that makes 3 not work, and 1 will work?
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 14th Sep 2009 12:27
You seem to have moved an endif so ended up with nested endif's thus meaning your last if block would never run.



Boo!
MPQC
15
Years of Service
User Offline
Joined: 7th Sep 2009
Location:
Posted: 15th Sep 2009 00:45
Much thanks.

Login to post a reply

Server time is: 2024-09-28 10:35:43
Your offset time is: 2024-09-28 10:35:43