It's Evil...
Displaying 1-4 of 4 total.
1
Fred
|
Can someone help me? I here have a problem thats been bugging me for weeks... I'm currently trying to make a status screen for my menu system, but I have some problems with the string arrays....
Things such as:
PrintString(0, pcname[temp]);
where pcname is holding the character's name return this message:
menu.vc(155) error: ) expected, ] got.
while if I do this
tempstring=pcname[temp];
I get:
menu.vc(155) error: Unknown assignement operator.
And I tried switching versions of V2... V2 V2K and V2k+J all give me those error messages... :(
-Fred
Posted on 2000-11-20 19:46:28
|
Tricron
|
I somtimes forget to make them strings... This seems a similar error message.
Quote: BlaH! How do I change my password?
Posted on 2000-11-20 21:03:17
|
Praetor
|
Are you sure that you have:
string pcname[];
as a global declaration? If you haven't declared pcname to be an array (and all arrays MUST be global) then it's quite possible to see the errors you're getting.
I didn't notice anything in VCC which checks to see if the variable you're using was declared as an array, so that would be a very probably explaination...
Praetor - Strong enough for a man, but made for a woman.
Posted on 2000-11-21 13:42:57
|
Fred
|
Well I finally understood I think... What was the problem, and it was kind of lame... :( After getting Praetor's and Tricron's Posts I took a look at my code to see if I did something wrong with the variable declaration, and a thought crossed my mind...
pcname is declared this way:
string pcname[MAXPC]; in and included system.vc file,
and going back to system.vc I looked at my defines and well.. MAXPC was defined this way:
#define MAXPC 1
I changed the one for a 2 and Yay... Vcc compiled so I guess it was just a wrong array declaration...
Thanks for your help...
- Fred
"Hey that's me..." - nuff said
Posted on 2000-11-21 16:56:35
|