Help with Marks Massive VB RPG game tutorial...

[b][red]This message was edited by Graiskye at 2006-8-15 1:2:26[/red][/b][hr]
Hello everyone, I have been looking for an active message board for a while. I am trying to teach myslef how to program using VB. Not having access to anyone who is an expert in VB a message board is the next best thing.
I have just started to work thru this reccomended tutorial, and whil;e it seems a little old, the author stated that itwill work in VB6, but I get a compile error right of the bat in the declarations...
Seems the problem is with this bit of code, tho I may be wrong??

[code]' create the Character array
Global Char As CharArray
' define the character inventory array
Global CharInv(10) As Integer[/code]

If required of course I can post the whole code. Im very new to VB so sorry if its something obvious, Thanks in advance for any advice, help whatever. Grais

Edit: I believe it is a syntax error I was getting due to the cut and paste, I downloaded the code itself and the program runs fine, I can go in and find the bit I was having a problem with and it looks good.
When I originally cut and paste the code it seems some character substitution takes place all the comments need to be fixed quotes and hyphens(if thats the right word)and for some strange reason all the lines with Global Char.
Thanks.

Comments

  • : [b][red]This message was edited by Graiskye at 2006-8-15 1:2:26[/red][/b][hr]
    : Hello everyone, I have been looking for an active message board for a while. I am trying to teach myslef how to program using VB. Not having access to anyone who is an expert in VB a message board is the next best thing.
    : I have just started to work thru this reccomended tutorial, and whil;e it seems a little old, the author stated that itwill work in VB6, but I get a compile error right of the bat in the declarations...
    : Seems the problem is with this bit of code, tho I may be wrong??
    :
    : [code]' create the Character array
    : Global Char As CharArray
    : ' define the character inventory array
    : Global CharInv(10) As Integer[/code]
    :
    : If required of course I can post the whole code. Im very new to VB so sorry if its something obvious, Thanks in advance for any advice, help whatever. Grais
    :
    : Edit: I believe it is a syntax error I was getting due to the cut and paste, I downloaded the code itself and the program runs fine, I can go in and find the bit I was having a problem with and it looks good.
    : When I originally cut and paste the code it seems some character substitution takes place all the comments need to be fixed quotes and hyphens(if thats the right word)and for some strange reason all the lines with Global Char.
    : Thanks.
    :
    :

    The problem is with the "Global Char As CharArray" line - "CharArray" is a user defined type or data structure. You may be able to change that line to "Global Char As String"
  • : : [b][red]This message was edited by Graiskye at 2006-8-15 1:2:26[/red][/b][hr]
    : : Hello everyone, I have been looking for an active message board for a while. I am trying to teach myslef how to program using VB. Not having access to anyone who is an expert in VB a message board is the next best thing.
    : : I have just started to work thru this reccomended tutorial, and whil;e it seems a little old, the author stated that itwill work in VB6, but I get a compile error right of the bat in the declarations...
    : : Seems the problem is with this bit of code, tho I may be wrong??
    : :
    : : [code]' create the Character array
    : : Global Char As CharArray
    : : ' define the character inventory array
    : : Global CharInv(10) As Integer[/code]
    : :
    : : If required of course I can post the whole code. Im very new to VB so sorry if its something obvious, Thanks in advance for any advice, help whatever. Grais
    : :
    : : Edit: I believe it is a syntax error I was getting due to the cut and paste, I downloaded the code itself and the program runs fine, I can go in and find the bit I was having a problem with and it looks good.
    : : When I originally cut and paste the code it seems some character substitution takes place all the comments need to be fixed quotes and hyphens(if thats the right word)and for some strange reason all the lines with Global Char.
    : : Thanks.
    : :
    : :
    :
    : The problem is with the "Global Char As CharArray" line - "CharArray" is a user defined type or data structure. You may be able to change that line to "Global Char As String"
    :


    K' Im new to this style of message board so I hope I'm doing this properley...
    Dokken2 Thanks. As it turns out this whole problem was caused by me not noticing the instructions to create a 'module'. When I did as instructed and created a module, I use the same syntax, and it works fine, commands, are commands, comments are comments.
    Sorry for the false alarm, I really was stumped ? I mentioned it on another VB board, and a kind poster pointed out, that possibly I missed an instruction to create a module ? Sure enough. Thanks again.
  • Here is a better place to field your VB game related questions ...

    http://www.vbgames.com

    Also a good resource for VB Game Programming in general ...

    http://gpwiki.org/index.php/Game_Programming_Wiki


  • [b][red]This message was edited by Graiskye at 2006-8-15 14:54:1[/red][/b][hr]
    : Here is a better place to field your VB game related questions ...
    :
    : http://www.vbgames.com
    :
    : Also a good resource for VB Game Programming in general ...
    :
    : http://gpwiki.org/index.php/Game_Programming_Wiki
    :
    :
    : Cool thanks a lot. I actually found the author of one of the books Im using, Johnathan Harbour, has a website(jharbour.com), with a message board, so that will be helpful for probs with the book Im working out of, but the more the merrier.



  • "Visual Basic Game Programming w/ Direct-X", I own and read most of the book. Some good stuff.

    : [b][red]This message was edited by Graiskye at 2006-8-15 14:54:1[/red][/b][hr]
    : : Here is a better place to field your VB game related questions ...
    : :
    : : http://www.vbgames.com
    : :
    : : Also a good resource for VB Game Programming in general ...
    : :
    : : http://gpwiki.org/index.php/Game_Programming_Wiki
    : :
    : :
    : : Cool thanks a lot. I actually found the author of one of the books Im using, Johnathan Harbour, has a website(jharbour.com), with a message board, so that will be helpful for probs with the book Im working out of, but the more the merrier.
    :
    :
    :
    :

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories