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.

DarkBASIC Professional Discussion / Windows 7 - Vector does not exist error when setting display mode

Author
Message
pdq
19
Years of Service
User Offline
Joined: 20th Jul 2006
Location:
Posted: 28th Jun 2011 02:14
I get a "vector does not exist error" when I run the code below:



Specs: Windows 7 64bit with SP1 and U77 DBPro.

-pdq
Ekko
22
Years of Service
User Offline
Joined: 27th Apr 2004
Location:
Posted: 28th Jun 2011 10:37 Edited at: 28th Jun 2011 11:54
I recently reinstalled Windows 7 and didn't do the SP1 update yet; the code above ran fine for me. I'm assuming you tried running it on other non-Windows 7 SP1 machines... updating Windows 7 now and I'll let you know the results.

[edit]

Ran fine after installing all windows updates.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 28th Jun 2011 12:48
Doesn't work for me - I needed to put the set display mode first, i.e.



Perhaps something has changed in a recent update? I know some things related to vectors have changed so perhaps this is one of them.
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 28th Jun 2011 12:55
When using set display mode it messes up A LOT of things in your code... For example, it deletes all of your images you had loaded, and it deletes all textures from any objects you had loaded (you will still have some white, untextured objects, so that's still ok...). I imagine it does weird things to variables, arrays, and vectors as well. Protip : Just keep that command at the very start of your program, and don't use it mid-program.

TheComet

pdq
19
Years of Service
User Offline
Joined: 20th Jul 2006
Location:
Posted: 28th Jun 2011 17:09
Prior to migrating to Windows 7 the code worked fine in XP. I am mentioning this because I am very concerned about programming DB in Windows 7 knowing that I may be wasting more time debugging if it is a Windows 7/DBPro issue. In my mind there should be absolutely no reason for the above code not to work.
=PRoF=
23
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 28th Jun 2011 20:33
I just tested the snippet on my Windows Vista PC (DBP 7.7) , and it came up with the same error.

If I move the set display mode command to the top, before all the vector stuff it works fine, just like TheComet says

The reason is, (I believe), that DBP vectors are the same as DirectX Vectors (more or less), and as DirectX flushes everything when u change resolution, then u'r Vectors need redeclaring as well as all the images and models needing to be reloaded.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 28th Jun 2011 21:19
Quote: "I am mentioning this because I am very concerned about programming DB in Windows 7 knowing that I may be wasting more time debugging if it is a Windows 7/DBPro issue."


It's nothing to do with Windows 7 - it's the same on my Vista machine. In fact I don't know why it worked at all for you. Which version of DBPro are you using?

As I and others have said, just put the set display mode command before the other stuff (no need to put it before the #constants though). I think =PRoF='s explanation is probably right.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th Jun 2011 23:03
I too was surprised by this, as I pretty much rewrote that plug-in the last time I got my hands on it, and it uses nothing that would be affected by a screen mode change.

However, I am semi-relieved to say that the piece of code that causes this problem is in a piece of code that I didn't touch at all! Phew!

The offending code is in the RefreshD3D statement, and has been there for a few years, since someone (Mistrel I think) asked for it.

Mang Master
18
Years of Service
User Offline
Joined: 22nd Mar 2008
Location:
Posted: 28th Jun 2011 23:10 Edited at: 28th Jun 2011 23:13
anybody else having really bad issues with the latest windows update? I get the "parameter is incorrect" thing when I try to run a DBPro Program.

Edit: Found the solution. Sorry.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 29th Jun 2011 02:17
Quote: "I am semi-relieved to say that the piece of code that causes this problem is in a piece of code that I didn't touch at all"


I guess you're only semi-relieved because you should have looked at the bit that does cause the error.

[Actually I can imagine how difficult it is to guess what is lurking in the source code - I'm sure it takes more than five minutes to read through. ]

Login to post a reply

Server time is: 2026-07-10 20:58:13
Your offset time is: 2026-07-10 20:58:13