I have the following code, and it gives me an error I have never seen before:
var/const/Player_Browse = {"
Welcome to Lord of Water's Texy game engine version [world.version]!
Please take note of the following things:
- At this point, this program is not finished to the point where you can actually play it. These test sessions are held so that I can work out bugs.
- The say verb only communicates with the game's GM ([GM]), while the chat verb communicates with everyone.
- Overuse of chat or request verbs (namely, spamming the setver in any way) may result in a boot. The GM has a boot verb, as well as a mute verb that will keep you quiet. Please be respectful!
Thanks for testing, and have a good time!
"}
And, the error:
Systems.dm:41:error:= :constant initializer required
The lime line is line 41.
Thanks!
ID:261227
Nov 5 2001, 1:13 pm
|
|
In response to Nadrew
|
|
No, it is not. I want to know why the compiler is giving me an error.
|
Lord of Water wrote:
I have the following code, and it gives me an error I have never seen before: the error is that you are useing the const var. form f1 help: The const type modifier defines a constant value. This may be useful for centralizing the location of a value that is used repeatedly so that it can be easily configured. It has the advantage over #define macros of obeying the normal scope rules for variables. This means, for example, that a const variable declared inside a proc will not conflict with other variables declared elsewhere. Example: mob var/const/max_items = 100 Enter(O) if(src.contents.len >= src.max_items) return 0 return ..() This example defines an upper limit on the number of items a mob may carry. |
You made that way too hard the easy way to do it is:
Now isn't that so much easier then using a var and all that?