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 / Why Won't This Work?

Author
Message
Mattman
21
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 10th Jul 2003 23:23 Edited at: 10th Jul 2003 23:25
i have this in my game for my click function:



and it won't work! on the line i showed you, it highlights it and syas "unregognised parimeter" in another program of mine i did recently i had about 5 to 6 and's per line and it worked fine. What is wrong?

---Mattman
DID YOU KNOW THAT ???
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 10th Jul 2003 23:35
function click()
if (mousex()>160 and mousex()<200) and (mousey()>30 and mousey()<60) and mouseclick()=1 then click = 1
endfunction

might be better, at the mo you have <200 being compared (and`ed) with true or false, that doesn`t make sense, no wonder the compiler was confused, cheers.

Mentor.

note: I added some brackets to ensure the compares are in the correct order, it should not alter the speed since the compiler will remove them when it makes the exe, and it saves having to remember the correct operator precedence when you make more complicated expressions, cheers.

Mattman
21
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 11th Jul 2003 00:05 Edited at: 11th Jul 2003 00:05
thx!!! new prob! try my code



---Mattman
DID YOU KNOW THAT ???
Vulcan Omega
21
Years of Service
User Offline
Joined: 17th Dec 2002
Location: United Kingdom
Posted: 11th Jul 2003 00:17
Hi there,

I think you have your ENDIF in the wrong place and just a slight alteration you get:



I hope that helps ya.

Vulcan Omega is closer than you think !
http://www.vulcan-omega.co.uk/
Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 11th Jul 2003 00:19
you got your else after your endif. put your endif after print"access granted"
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 11th Jul 2003 00:20 Edited at: 11th Jul 2003 00:22
I am just reinstalling some new stuff at the mo and haven`t got pro set up on this machine, [edit] just removed long (and wrong) ramble, see answers above.

Mentor.

Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 11th Jul 2003 00:20
lol - u type faster than me vulcan
Mattman
21
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 11th Jul 2003 00:56
ahh, thx!!!

---Mattman
DID YOU KNOW THAT ???

Login to post a reply

Server time is: 2024-09-20 15:51:53
Your offset time is: 2024-09-20 15:51:53