-
Notifications
You must be signed in to change notification settings - Fork 83
WhatErrorsMean
This is a page for explaining what various errors mean in more depth
You're using a set SpacemanDMM_SOMETHING = 1
directive that either doesn't exist or only exists in a newer version of SpacemanDMM.
The BLANK directive is only supported in the base/root definition of a proc and you're trying to do it in a child/override of the proc.
Should not sleep procs are meant to not use any blocking calls, but using set waitfor = 0
is intended for procs that do use blocking calls, these two things are not compatible.
Fairly straight forward, should not sleep procs aren't allowed to call blocking built-ins such as sleep() or input(), it will list where and what is called that are considering blocking calls.
Similar to the previous one except this is where the proc calls a user-defined proc that fails the above test.
This proc does something that has a lasting effect such as setting non-local vars or sending user output, it will list where each purity-breaking operation is.
As above, calling a user-defined proc that breaks purity.
Since pure procs have no lasting effects, calling one without doing something with the return value is pointless.
Something is using set __SETTING__
and SETTING isnt in the byond documentation.
This code likely can't be reached because it's after a return or a control structure excludes it
The do while loop always calls return/break/continue without it ever being possible to complete a single loop
You have a range loop and have likely done something like an inverted step that prevents the loop ever running
You likely have !something in alist
which is parsed/compiled as (!something) in alist
, add brackets to fix this -> !(something in alist)
The same also applies to foo && bar in alist
and similar
A prefab is failing to resolve, this software does not support .procname
syntax due to lengthy reasoning, in most cases changing it to .proc/procname
will resolve the issue. This searches from the current path of the proc upwards.
If that doesn't work you will need to explicitly define where the procpath or similar is, eg /mob.proc/someproc
This can also occur when calling new
with an invalid prefab/path
Calling parent ..()
on a parentless proc does nothing.
This is raised when you call new
with no type provided and no typehint on the var is provided either, for example var/foo = new
This occurs when using new
on a type and that type for some reason does not have a /New()
proc, excluding /list
Mostly applies to built-in types that don't inherit from /datum
This is a type safety check to avoid the careless/silent use of :
(runtime search operator) over .
(compile time search operator)
In certain situations even when you use .
, byond will silently use :
// 1
foo.field // this uses .
// 2
proc/foo()
return new /a/type
[...]
foo().field // this uses :
// 3
var/list/foo = list(new /a/type)
[...]
foo[1].field // this uses :
So dreamchecker will raise a warning where it cannot find type information on the thing you are trying to access a var/proc on. It will give you a link to the var/proc definition so you can explicitly provide a typehint. eg add a type annotation after /list here
So to fix the above examples you could do the following;
// 2
proc/foo()
set SpacemanDMM_return_type = /a/type // see dreamchecker readme for a macro
// 3
var/list/a/type/foo = list(new /a/type)
If you don't overload ++/-- on a type by doing eg /a/type/proc/operator++()
then using ++/-- on a var of that type will change the reference to 1/-1 which is likely a massive bug.
This can also trigger if you provide a typehint on a list where you shouldn't. If only the key for that list is of the type, then it doesn't need that typehinted for that list.
Some filter parameters can't have more than one flag at a time.
Check the dm reference to make sure you are using the right flags with the right filter.
You can't set some filters' flag type var to 0
This is a catch-all error, please let spookydonut#6995 on discord know if you get this and provide examples
You are trying to use a keyword argument that doesn't exist, for example;
/proc/foo(one, two)
[...]
foo(three=3)
This can also occur if the keyword argument is defined on an override of that proc, but not where that override would be used, for example;
/mob/proc/foo(one, two)
/mob/proc/test()
foo(three=3)
/mob/living/foo(one, two, three)
To fix this, add the missing keyword argument to that proc.
You can't use positional arguments after keyword arguments, foo(three=3, 2)
. This will compile but will runtime.
an override of PROCNAME is missing keyword args / NUM overrides of PROCNAME are missing keyword args
Your indentation needs to be a multiple of the first indent encountered, so if you first indent with 2 spaces all further indentation for that proc needs to be a multiple of 2, 5 spaces would result in this error
You also need to step your indentation one multiple at a time, you can't go from 2 space to 6 spaces.
Reached the end of the file with an unclosed /*
, check for a missing */
if you write a character that can't be part of a token eg 0x$1
You don't need to use var/
in proc arguments
static does nothing in proc arguments
applies to ternary where you don't have anything after the :
locate()
does weird/wrong things if you do this
empty ()
macro {:?} used immediately before being {}:\n\https://secure.byond.com/forum/?post=2072419
DM really does reorder the declaration to appear before the override,
but only when a /proc
block appeared somewhere prior to the
override. http://www.byond.com/forum/post/2441385
Correctly implementing the "existence of a /proc block" check would
be too onerous, so let's assume the user wrote something that they
expect DM to compile.