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 / Declaration name ' ) ' Invalid???

Author
Message
Black Hydra II
21
Years of Service
User Offline
Joined: 26th Nov 2003
Location:
Posted: 16th Apr 2004 22:14
Sorry, but I got this error when compiling. It confuses me because first of all, I haven't tried declaring a function with a ')' and because the error of the line has no code on it!

Here is the code situated around the problem (I doubt you guys wanna look at all 1500 lines of the program) However, I would like to know what this error means, then I will know what problem to look for!

Function DeactivateArmy_COM(ArmyNumber)
Armies_S(Calendar_S(7), ArmyNumber, 7) = 1
EndFunction
<<-------This is where the 'error' occours
Function ActivateAllArmies_COM() `Activates every army in the game (for a new turn)
FOR Z = 1 TO MaxPlayers
FOR X = 1 TO MaxArmies
Armies_S(Z, X, 7) = 0
NEXT X
NEXT Z
EndFunction

I doubt that code snippet will help too much, however, if anyone knows what this means then they would be a lifesaver

"Damn had to remake account!" direct quotation from previous account.
the_winch
22
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 16th Apr 2004 22:32
Try moving the comment off the line with FUNCTION.
Function ActivateAllArmies_COM() `Activates every army in the game (for a new turn)
To
Function ActivateAllArmies_COM()
`Activates every army in the game (for a new turn)

you ain't the cops
Black Hydra II
21
Years of Service
User Offline
Joined: 26th Nov 2003
Location:
Posted: 16th Apr 2004 22:36
Wow, that seemed to work.

Funny, cause it compiled last time and I hadn't changed that...

"Damn had to remake account!" direct quotation from previous account.
zircher
22
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 16th Apr 2004 22:44 Edited at: 16th Apr 2004 22:44
Call it luck the first time. In DBP, rem and ` are commands and not compiler directives. If you use them on the same line with other commands, use a semi-colon.

bubba = bubba * 2 : rem The semi-colon tells the compiler a new command is starting.

bubba = bubba * 2 : ` same thing.
--
TAZ

Black Hydra II
21
Years of Service
User Offline
Joined: 26th Nov 2003
Location:
Posted: 17th Apr 2004 00:53
I guess... Its just a little weird that it worked so often before...

Thats good to remember though! Thanks for the help

"Damn had to remake account!" direct quotation from previous account.

Login to post a reply

Server time is: 2025-06-08 03:47:27
Your offset time is: 2025-06-08 03:47:27