ID:2669955
 
(See the best response by F0lak.)
Code:


Problem description:


code\_helpers\unsorted.dm:512:error: arctan: invalid proc name: reserved word
(512) line proc/arctan(x)
var/y=arcsin(x/sqrt(1+x*x))
return y
code\modules\organs\external\_external.dm:986:error: clamp: invalid proc name: reserved word

(986) /obj/item/organ/external/proc/clamp()
Best response
Mr_Scorp wrote:
code\_helpers\unsorted.dm:512:error: arctan: invalid proc name: reserved word

You're trying to define a proc with the same name as a built-in function. arctan is out-of-the-box as of version 513, so you don't need to define your own maths for it.

If you still prefer to use your own implementation you'll have to assign it a different proc name such as ArcTan(), _arctan(), my_arctan() or something of the sort.

The same applies to clamp
I just wanna host server dead space 13 server but when I compile thate errors happen
/obj/item/organ/external/proc/clamp(0)
var/rval = 0
src.status &= ~ORGAN_BLEEDING
for(var/datum/wound/W in wounds)
rval |= !W.clamped
W.clamped = 1
return rval
I already fixed arc line with your advice
In response to F0lak
help pls
From what you're telling me, it doesn't sound like you have your bearings about you for the size of the project that you're trying to work on.

If you're simply trying to host a game, then you should only need the host files for that game, not the source code.

If you're trying to edit a pre-existing source then I would suggest you do some light reading before you dive in, as just editing code with no real idea of what you're doing can be disastrous for the project (and potentially your computer!)
code\modules\organs\external\_external.dm:986:error: clamp: invalid proc name: reserved word
line 986 /obj/item/organ/external/proc/clamp()





that happens when I try to compile
In response to Mr_Scorp
As I said on the other help request you made you're trying to define a new proc with the same name as one that's already built-in to the engine.

For future reference and to make it easier to help you in the future, you can wrap your code snippets in the <dm> tags so that it appears like this:
mob
proc
MyProc()
In response to F0lak
/obj/item/organ/external/proc/clamp()
var/rval = 0
src.status &= ~ORGAN_BLEEDING
for(var/datum/wound/W in wounds)
rval |= !W.clamped
W.clamped = 1
return rval
In response to F0lak
code\modules\organs\external\_external.dm:986:error: incorrect number of macro arguments
/obj/item/organ/external/proc/Clamp()
var/rval = 0
src.status &= ~ORGAN_BLEEDING
for(var/datum/wound/W in wounds)
rval |= !W.clamped
W.clamped = 1
return rval
I've attached your thread in BYOND Help to this one as you're attacking the same issue you described here.

clamp and arctan are native procs now, as F0lak already mentioned. You'll need to rename your codes' version of these procs, and change all places they're referenced to use the new name if your goal is to be able to compile in newer versions of BYOND.