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 / Error when declaring variable in function

Author
Message
Mew151
16
Years of Service
User Offline
Joined: 1st Jun 2008
Location: Glitch city
Posted: 14th Feb 2010 07:38
When I declare a variable in the function, this pops up:

Quote: "Cannot find structure 'Character:Errorcode$' in local decoration at line 128"


My function's name is Character, and the variable being declared is called Errorcode, and is a string:


IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 14th Feb 2010 13:08
Which line is 128? Have you got anything else called Character, such as an array or a global variable?

Try putting your problem code into a new project, then investigate and get it working there.

I've made a few guesses to do something like this and there is no problem with that code:


Mew151
16
Years of Service
User Offline
Joined: 1st Jun 2008
Location: Glitch city
Posted: 14th Feb 2010 18:45
Now I know why. I have a type called "Character" I changed it to "Charactervar" and it works now. Thanks!

LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 14th Feb 2010 18:57 Edited at: 14th Feb 2010 18:58
I wrote a pseudo program using your function and it worked for me. Did you declare errorcode$ as global?


EDIT: You posted right before me. Oh well, good luck with it.

Login to post a reply

Server time is: 2024-11-24 20:33:41
Your offset time is: 2024-11-24 20:33:41