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 / TYPE causing error: Declaration is not valid at line 7.

Author
Message
Uber Ker Noober
19
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Sheffield, UK
Posted: 21st May 2010 17:13
I get the error message "Declaration is not valid at line 7." (line 7 being the first line of code below;

I have no idea why this is happening :S

I'm using latest DBPro verson with codesurge
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 21st May 2010 17:17
This works...



I was thinking it's one of the type names being a reserved word - but it seems the one it dislikes is TEAM - I would have guessed CLASS or something like that!

Best to change that to something else.


Health, Ammo, and bacon and eggs!
Uber Ker Noober
19
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Sheffield, UK
Posted: 21st May 2010 17:24
Ah yeah, I forgot all about the infamous reserved words. Thanks Van B
Uber Ker Noober
19
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Sheffield, UK
Posted: 21st May 2010 17:31 Edited at: 21st May 2010 17:38
okay now it is failing with "Could not understand command at line 345". Line 345 being "procprop(t,b$)"


EDIT: The input file being;
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 21st May 2010 17:39
Ahh, check the END FUNCTION on load_npc - I think it's running into the function call without closing load_npc, kill the space and see if that fixes it.


Health, Ammo, and bacon and eggs!
The Slayer
Forum Vice President
16
Years of Service
User Offline
Joined: 9th Nov 2009
Playing: (Hide and) Seek and Destroy on my guitar!
Posted: 21st May 2010 19:49
Quote: "I was thinking it's one of the type names being a reserved word - but it seems the one it dislikes is TEAM"

Isn't it because he uses two times the word 'as'??

Quote: "team as as integer"


Cheers

Slayer rules!!! Yeaaah, man!
luskos
19
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 21st May 2010 21:24
Even i see that VanB commented the line with double "as" he missed that, and proposed something else.

Where there is a will, there is a way.
I often edit my posts, that`s who i am
The Slayer
Forum Vice President
16
Years of Service
User Offline
Joined: 9th Nov 2009
Playing: (Hide and) Seek and Destroy on my guitar!
Posted: 21st May 2010 22:01
Quote: "Even i see that VanB commented the line with double "as" he missed that, and proposed something else."

Yeah, but VanB commented that line because he thinks that 'team' is a reserved word, while I think that the error came from having two times the command 'as' (look at both snippets).

Slayer rules!!! Yeaaah, man!
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 21st May 2010 22:20
Hehe, I never noticed that .


Health, Ammo, and bacon and eggs!
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 21st May 2010 22:23
Van's hit the drinks again... Out of interest, this works:



A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.
TyJBr2
AGK Backer
16
Years of Service
User Offline
Joined: 30th Jul 2009
Location:
Posted: 22nd May 2010 10:04
I would take out that double "as as" and that remend to no remstart.

Login to post a reply

Server time is: 2026-07-25 16:18:35
Your offset time is: 2026-07-25 16:18:35