Using the old "macro" script command (see "macro" under the Dream Maker F1 help), you can create macros for letters, but not for numbers.
Numbered Steps to Reproduce Problem:
1. Create a macro file (ending in .dms)
2. Include file with project.
3. Try to make the macro trigger with a number (1,2,3,4,5,6,7,8,9,or 0).
4. Error, cannot compile.
Code Snippet (if applicable) to Reproduce Problem:
/*
These are simple defaults for your project.
*/
world
fps = 25 // 25 frames per second
icon_size = 32 // 32x32 icon size by default
view = 6 // show up to 6 tiles outward from center (13x13 view)
// Make objects move 8 pixels per tick when walking
client
command_text = ".alt " // macro mode
mob
step_size = 8
verb/inventory()
usr << "You're not carrying anything, silly!"
verb/say(var/textToSay as text)
view() << "[name]:[textToSay]"
obj
step_size = 8
This .dms file works:
macro
i return "inventory"
This .dms file does not:
macro
1 return "inventory"
See actual results for the error message.
Expected Results:
.dms file that does not work would compile and work identically to .dms file that does.
Actual Results:
During compile, I get this error message:
loading MacroTest.dme
loading macrotest.dms
D:\Users\YourName\Documents\BYOND\My Games\MacroTest\macrotest.dms:2:error at '1': expected end of macro block
D:\Users\YourName\Documents\BYOND\My Games\MacroTest\macrotest.dms:2:error at '1': unexpected character
MacroTest.dmb - 0 errors, 0 warnings
Does the problem occur:
Every time? Or how often?
Every time.
In other games?
N/A
In other user accounts?
N/A
On other computers?
N/A
When does the problem NOT occur?
Unknown.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
I am seeing old, old forum posts here with people having this problem (and other people failing to provide a solution),so I'm guessing it's bee around for awhile.
Workarounds:
You can use an interface, but this solution won't work if you want to use BYOND's default interface (e.g. for flash compatibility).
You can instruct your users to make their own macros in DreamDaemon (F1, client, macros) but this may create incompatibilities with other games.
There may be a working workaround, but I'm not sure what it is and neither Dream Maker F1 nor forum crawling seems to have produced the answer.
You can set up macros in-game using winset() without having to make an interface.
Also, you can't begin variables or objects in DM with a number. Doing var/1 or obj/chocolate/7 will give you a compile error as well.