#A public method is not visible??

10 messages · Page 1 of 1 (latest)

rugged flower
#
if let Some(player) = self
                            .players
                            .get_mut(&unit_initialized_event.control_player_id)
                        {
                            if is_valid_structure_or_unit(&unit_initialized_event.unit_type_name) {
                                let placement: Option<Placements> =
                                    identify_placement(&unit_initialized_event.unit_type_name);

                                match placement.unwrap() {
                                    Placements::Structures => {
                                        player.register_structure()
                                    }

#

for some reason

#

player.register_structure is not a valid function...

#

it doesnt make sense

#

error: no method named register_structure found for mutable reference &mut Player in the current scope
label: this is an associated function, not a method

placid fox
rugged flower
#

ohh

broken vault
#

Assoc function can't be called using dot ) Player::my_assoc_fun(player)

rugged flower
#

OH NICE IT WORKS

#

YO THANKS