/obj/item/organ/external/head
organ_tag = BP_HEAD
icon_name = "head"
name = "head"
slot_flags = SLOT_BELT
max_damage = 75
min_broken_damage = 35
w_class = ITEM_SIZE_NORMAL
body_part = HEAD
vital = 1
parent_organ = BP_CHEST
joint = "jaw"
amputation_point = "neck"
gendered_icon = 1
encased = "skull"
artery_name = "cartoid artery"
var/can_intake_reagents = 1
var/eye_icon = "eyes_s"
var/has_lips
var/max_teeth = 32
var/list/teeth_list() = list() //Fixed
/obj/item/organ/external/head/get_agony_multiplier() //Here error
return (owner && owner.headcheck(organ_tag)) ? 1.50 : 1
/obj/item/organ/external/head/robotize(var/company, var/skip_prosthetics, var/keep_organs)
if(company)
var/datum/robolimb/R = all_robolimbs[company]
if(R)
can_intake_reagents = R.can_eat
eye_icon = R.use_eye_icon
. = ..(company, skip_prosthetics, 1)
has_lips = null
ID:2545220
Feb 17 2020, 7:13 am (Edited on Feb 17 2020, 10:42 am)
(See the best response by Lummox JR.)
|
|
I`m newbie in this code and i need help with this
|
What does this mean?
var/list/teeth_list() = list() //Fixed Specifically, those parenthesis following teeth_list. |
In response to Major Falcon
|
|
There was a mistake (Number of teeth, maximum 32, if 1, return)
|
Okay, I see you've edited your post. Here's the key to look at:
var/list/teeth_list() = list() //Fixed Sometimes compilers will throw an error message on the line following the one where the actual problem occurs. This can happen if there's a problem with the syntax, and the compiler keeps moving forward in the hope that something will make sense. The syntax error that caused this is on the line labeled "Fixed". You have () right after your var name, but () isn't valid in a var declaration. Parentheses are used for procs. The line should look like this:
var/list/teeth_list = list()
However, even that is not ideal. I would actually suggest going with this:
var/list/teeth_list
Here, teeth_list is null until you create the list by assigning teeth_list=list() or teeth_list=new, and I wouldn't create that list until it's needed. When you set a var to list() at compile-time, what actually happens is that a special "init proc" is built that will run some code when the object is created. These init procs can be very bad for performance if there are too many of them or they're put in a place that comes up often. |
You need to add more info to your post so people can help you. In particular, nobody knows where you're seeing "bad argument definition". Point out which line that is, please.