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 / My IF statement is causing a syntax error?

Author
Message
JHawks
16
Years of Service
User Offline
Joined: 18th Jul 2009
Location:
Posted: 13th Jul 2011 08:00 Edited at: 13th Jul 2011 08:03
Hi all,

I just downloaded the free trial version of DBPro and was making an if statement when it keeps producing a "Compilation Failed (Syntax Errors)" error.

I've worked with DBPro before and I can't seem to know what's wrong exactly.

Here is the code:



zdirection and keytoggle are both global integeres by the way.

When I F5, it highlights the IF statement and produces that error.

I don't see what's wrong with it.

Can anyone help?

EDIT: Never mind, I had to close and re-open DBPro via "Run as Admin" before it works. Is this a bug?
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 13th Jul 2011 11:51
That function works fine here so I guess the problem is earlier in your code. Here's the code I used:

basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 16th Jul 2011 03:56
I tried this function but I had no problem, check the code within the main program.

Login to post a reply

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