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 / Compiled EXE Doesn't Run + Error

Author
Message
Chicken McJerry
15
Years of Service
User Offline
Joined: 9th Jan 2011
Location:
Posted: 9th Jan 2011 21:41
Hey I just installed DarkBASIC and I'm trying to code my first program. I have it all coded and written up but when I try to run it I get a "Both operands are required for non-uniary operations..." error. Also when I go into the Demo and try to boot a program the only thing that happens is a black window flashes on my screen and I can see another window opening and closing quickly in my toolbar. I am running Windows 7 and have DarkBASIC on Administrative Mode.

Anyone have any ideas?

Here is my code..

BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 9th Jan 2011 22:17
What line is mentioned in the error message?

When I copy & paste your code into DBPro, it works fine.
Start a new copy of DBPro, copy & paste your posted code from here, Does it run when you press f5?
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 9th Jan 2011 22:18
The bug reports forum is for DBPro bugs, not 'I can't get this to work' bugs, so I've moved your post here.

Next, upgrade DBPro to the 7.5 version as I can get your code to compile just fine (although it shouldn't actually compile).

Finally, you may want to consider cutting down on the number of comments that you use - they are hiding the mistake you made on your POINT CAMERA command. Too many comments are as bad as none at all IMO.

Chicken McJerry
15
Years of Service
User Offline
Joined: 9th Jan 2011
Location:
Posted: 10th Jan 2011 03:22
Thanks for the replies guys, the comments are because it's my first try ever and I didn't want to forget anything.. I'll update and see what happens
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 10th Jan 2011 12:11 Edited at: 10th Jan 2011 19:14
Quote: "Next, upgrade DBPro to the 7.5 version as I can get your code to compile just fine (although it shouldn't actually compile)."


In other words it IS a bug after all. This should go back to the Bug Reports board, surely. There is a clear bug in that most lines in that snippet should flag up an error. You can see the error that should be given if you change the first line (or any similar line for that matter) to



In that case the compiler flags an error but not if text follows the Rem.

The line with point camera flags a different error but for essentially the same reason - i.e. the handling of "Rem" doesn't seem quite consistent.

Looks like a bug to me.

I may have misunderstood but I would expect the parser to either ignore or remove the Rem and any following text before doing further processing. So the poster's snippet shouldn't compile - with an error being reported on the point camera line - AND my first snippet should compile (i.e. why should an empty comment be treated differently from a non-empty one?).

[Edited code tags. ]
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 10th Jan 2011 16:39
The point camera command has an extra unnecessary comma in it, see.
Quote: "Point Camera 0, 0, 0, Rem "


My signature is NOT a moderator plaything! Stop changing it!
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 10th Jan 2011 19:15
We know. What's your point exactly?
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 10th Jan 2011 19:29
The point is that it should throw a syntax error but it doesn't. I'm running version 1.071.

"Only the educated are free" ~Epictetus
"Imagination is more important than knowledge..." ~Einstein
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 10th Jan 2011 19:40
We know all that.

Why are you and Mobiius repeating what has already been established?

Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 10th Jan 2011 20:16 Edited at: 10th Jan 2011 20:17
Did I mention that the point camera command has an extra unnecessary comma in it, see.
Quote: "Point Camera 0, 0, 0, Rem "


My signature is NOT a moderator plaything! Stop changing it!
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 11th Jan 2011 11:34
We know. Why do you keep telling us?
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 11th Jan 2011 13:00
Did I mention that the point camera command....

Sorry, couldn't resist.

My signature is NOT a moderator plaything! Stop changing it!
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 11th Jan 2011 13:24
I've made an appropriate bug report for this.

inconsistent handling of rem reserved word

Mobiius

If you must comment on the bug report please make it a sensible comment.
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 11th Jan 2011 14:37
Sorry (But I was so tempted to post about the comma again in the bug post! )

My signature is NOT a moderator plaything! Stop changing it!
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 11th Jan 2011 14:50
I won't ask "Which comma?".
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 11th Jan 2011 15:22
lolz

My signature is NOT a moderator plaything! Stop changing it!

Login to post a reply

Server time is: 2026-07-21 15:13:15
Your offset time is: 2026-07-21 15:13:15