Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Compile Error: Variable Not Defined


tairapeters
 Share

Recommended Posts

> As slasher said but to be a bit more specific,
>
> add
>
> public const MAX_QUESTS = 255
>
> to modConstants under 'General Constants in both client and server.

Sorry, but that's not entirely correct.

```

Public Const MAX_QUESTS As Byte = 255

```

is how it should be in order for it to work.
Link to comment
Share on other sites

> You should know there is an Any type that can hold any thing. String, int,long, boolean, single etc.
>
> If byte wasn't added I think that VB will recognize it as an Any, and since it is 255 might take as a long.

Which is the slowest thing imaginable and you should _never_ use it.

> it still comes up with an error but shouldnt it be "as long" instead of as byte

What error does it come with? Type mismatch?
Link to comment
Share on other sites

> it still comes up with an error but shouldnt it be "as long" instead of as byte

A long and a byte are almost the same. They are numbers but have diffrent max values. Byte has a max value of 255 while long has one of 2^31-1 (Aprrox. 2bil)

> This one, and the code behind it highlighted…
>
> ![](http://i.imgur.com/dviU3.png)

If I remember correctly the QuestRec is give along with the modQuests module. You will have to add it to your project before you can continue. (Hint: Ctrl+D)
Link to comment
Share on other sites

> A long and a byte are almost the same. They are numbers but have diffrent max values. Byte has a max value of 255 while long has one of 2^31-1 (Aprrox. 2bil)
>
> If I remember correctly the QuestRec is give along with the modQuests module. You will have to add it to your project before you can continue. (Hint: Ctrl+D)

What value should this be at, because it was missing for some odd reason and I made it 40, but i know that its shouldnt be at 40

![](http://i.imgur.com/0wZLY.png)

If you cannot find it then Im talking about "Public Const MAX_EVENTS As Long = ???"
Link to comment
Share on other sites

Yeah but now there is something to do with this variable not being defined, BTW thanks so much for your help with the other problem.

The Defaults were all set on longs and I didnt want to mess with them too much. But now it highlights this code.

![](http://i.imgur.com/Klzj0.png)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...