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 Discussion / Wtf Keep getting Parameter dont exist

Author
Message
white boy kyle
18
Years of Service
User Offline
Joined: 5th Feb 2007
Location:
Posted: 9th Feb 2007 21:14


Keeps saying
Syntaxt Error: Unreconized Parameter on this line
if Button(20,55,"New Game")=1 then goto question2
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 9th Feb 2007 22:50 Edited at: 9th Feb 2007 22:56
Where is your Button() function?

Also, you say:

Quote: "
If button(20,55,"Set up Game")=1 then goto mainmenu:
"


The : on the end of 'mainmenu' you use only to define labels, not when you're actually going to them. It's probably this stopping it from working, assuming Button() is there.

-=-=- Activate asshat mode. -=-=-
Warning: This post may contain bloatage.
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 9th Feb 2007 22:50
The function call parameters and function header parameters do not match.

As you didn't post the function we can't be more specific.

And try to refrain from using abbreviations like you used in the topic line please. It's not so bad in the main body text of a post, but in the topic line it is a bit 'in your face'.

TDK_Man

Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 9th Feb 2007 23:21
this is for grog grueslayer, he hates goto
try not to use goto there are better ways that cause your code to not be so messy...instead of if button(newgame)=1 then goto question 2

just use
if button(newgame)=1 then exit

that will exit the loop instead of using labels

Bluestar4
19
Years of Service
User Offline
Joined: 19th Dec 2005
Location: USA
Posted: 9th Feb 2007 23:26
this is one instance where goto needs to be gone and you should use subs,functions, and repeat until loops.

TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 9th Feb 2007 23:34 Edited at: 9th Feb 2007 23:34
I was going to mention that lol - but I thought people might be getting tired of my ranting about the evil Goto command!

The same goes for my relentless tutorial plugging. But in this case they might help white boy kyle.

Check out the Layout, Structure & Style tutorial (number 2) at:

http://forum.thegamecreators.com/?m=forum_view&t=99497&b=7

TDK_Man

Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 10th Feb 2007 21:53
@ Kieran

Amen!

@ TDK

People just don't like to be told the truth sometimes.

@ white boy kyle

One set of commands that'll help wrangle menus and (looking at your other messages) give you the ability to pick random questions from a list of many is the select/case commands.



white boy kyle
18
Years of Service
User Offline
Joined: 5th Feb 2007
Location:
Posted: 12th Feb 2007 18:16
Thanks everyone for your reply..

Login to post a reply

Server time is: 2025-05-26 03:25:54
Your offset time is: 2025-05-26 03:25:54