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 / DBPro Command 'Mouseclick' not recognized

Author
Message
Katyman
FPSC Reloaded TGC Backer
12
Years of Service
User Offline
Joined: 5th Oct 2012
Location: Katy, Texas USA
Posted: 5th Oct 2012 13:47
Hello! I am having a very annoying problem with compiling my program. I keep getting: Variable 'MOUSECLlCK' does not exist in program.

I ran a demo program for MOUSECLICK() and it worked well but when I copy the lines into my program I keep getting the above mentioned error. I delete and re-type the lines in case there were any hidden characters or glitches. This is a snippet where it halts:


rem ::::: Move routine with Mouse plus some cleanup
REM *** Check for mouse click ***
mousevalue = MOUSECLICK()
if mousevalue=1
move camera 32
dce$= " "
die3$= " "
line1$=" "
line2$=" "
line3$=" "
line4$=" "
line5$=" "
line6$=" "
line7$=" "
line8$=" "
endif

if mousevalue=2 then move camera 32*(-1)
ry#=wrapvalue(ry#+mousemovex())
rotate camera rx#,ry#,0

Any help or suggestions. The mouse clicks moved the camera in a 3-D environment forward or backwards.
nonZero
13
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 6th Oct 2012 23:56
It runs fine for me. Is this copy-pasted from your actual program? If not, check your spelling or post your actual code here, following the example:


Katyman
FPSC Reloaded TGC Backer
12
Years of Service
User Offline
Joined: 5th Oct 2012
Location: Katy, Texas USA
Posted: 7th Oct 2012 00:23
I found the source of my problem. Had nothing to do with MOUSECLICK() but the compiler.

In the past I was able to do this with my coding:

else:endif

and Mouseclick():Rem select Left or right click

For some reason now, the new compiler does not see ":" as a divider. I re-wrote and removed all the ":" dividers and I no longer get the 'Variable' error no more on Mouseclick(). Any ideas? I have what came with Dark Game Studio and latest update to DPPro.

Sorry for the double post. Newbie you know.
nonZero
13
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 7th Oct 2012 13:41
You still can use : as a divider but it requires a space and I would not recmend it for comments. Just use one of the following:


Here's a brief example of colon use



Things to avoid are:
   Comments ending in three periods: Rem Blah blah blah...
      Fix with: ` eg: Rem Blah blah blah...`
   Comments ending with colons (apparently): Rem Some comment:
      I haven't encountered this problem though I remember hearing about it so I apply the above fix just to be safe, eg: Rem blah:`

Hope this clears it up

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 7th Oct 2012 20:59 Edited at: 8th Oct 2012 04:03
Quote: "latest update to DPPro."


U77RC7?

Login to post a reply

Server time is: 2024-11-23 17:39:45
Your offset time is: 2024-11-23 17:39:45