ID:1519635
 
Resolved
BYOND Version:506
Operating System:Windows 7 Home Premium 64-bit
Web Browser:Firefox 27.0
Applies to:Dream Maker
Status: Resolved

This issue has been resolved.
Descriptive Problem Summary:
I tried to compile the space station 13 source code for tgstation on the command line using dm.exe, while it compiles in the DreamMaker IDE fine, it doesn't work using dm.exe on the command line.

I have set my PATH to include the bin directory and am simply trying to compile using: dm tgstation.dme

However I get a lot of errors to do with certain built in procs and variables not being defined. I built a test project to discern what the problem could be, described in this post.

(I have tried in byond version 504 as well as 506)

Numbered Steps to Reproduce Problem:
  1. Add byonds bin directory to the PATH
  2. Open a command prompt
  3. Navigate to the directory of the project
  4. Run: dm testing.dme



Expected Results:
Output that matches the behaviour in the Dream Maker IDE.

Actual Results:
Error messages about variables being undefined.

I first thought it could that the order of included files differs to that when compiling within Dream Maker. But after looking at the error messages it looks like an issue with certain atom/icon variables.

Code Snippet (if applicable) to Reproduce Problem:
obj
step_size = 8
proc
blender()
// will it blend?
if(blend_mode == BLEND_DEFAULT)
blend_mode = BLEND_DEFAULT
alphaMale()
world << alpha
turnAround()
var/icon/I = new(usr.icon)
I.Turn(90)
colorMeSuprised()
color = rgb(255,0,0)
transformers()
// Rotate the atom by 45° clockwise
src.transform = turn(src.transform, 45)
enterThe()
var/matrix/M = matrix()
M.Turn(45)
src.transform = M


Error Messages:
testing.dm:6:error: blend_mode: undefined var
testing.dm:6:error: BLEND_DEFAULT: undefined var
testing.dm:7:error: blend_mode: undefined var
testing.dm:7:error: BLEND_DEFAULT: undefined var
testing.dm:9:error: alpha: undefined var
testing.dm:14:error: color: undefined var
testing.dm:19:error: matrix: undefined proc
testing.dm:20:error: M.Turn: undefined type: M.Turn
testing.dme:17:error: M: undefined type: M
testing.dm:17:error: src.transform: undefined var
testing.dm:17:error: src.transform: undefined var
testing.dm:21:error: src.transform: undefined var
testing.dm:19:warning: M: variable defined but not used


Does the problem occur:
Every time? Or how often?
Every time
On other computers?
I haven't been able to test it on another computer.

When does the problem NOT occur?
I have tried using dm.exe on a few other projects and it seems to work with no problems

Workarounds:
Not to use these built in procs and vars
From the looks of it, your command line is finding an older version of dm.exe (and byondcore.dll) installed somewhere. That's why you're seeing this issue.
So it does, not sure why I have an older version saved and on the PATH, thanks Lummox that solved it.
Lummox JR resolved issue