/c if game.player.selected then game.player.selected.alert_parameters.alert_message=game.player.selected.alert_parameters.alert_message.."what" end
The modding docs say this table is read and write, but at least this alert_message is read only (or broken) otherwise the command above would not silently fail for me (it doesn't change it).
[2.1.9] programmable speaker .alert_parameters.alert_message is read only?
Re: [2.1.9] programmable speaker .alert_parameters.alert_message is read only?
You have to read the entire alert_parameters value into a local variable, modify what ever sub-values you want, then write the entire thing back in one go.
If you want to get ahold of me I'm almost always on Discord.
Re: [2.1.9] programmable speaker .alert_parameters.alert_message is read only?
That still didn't fix my issue. My game disagrees with you.
Re: [2.1.9] programmable speaker .alert_parameters.alert_message is read only?
I can't read the script in your screenshot, it's too complicated. Try this script instead:
Code: Select all
/c game.print(serpent.block(game.player.selected.alert_parameters)); game.player.selected.alert_parameters = {alert_message = "Hello world", show_alert=true, show_on_map=true}; game.print(serpent.block(game.player.selected.alert_parameters))My mods: Multiple Unit Train Control, RGB Pipes, Shipping Containers, Rocket Log, Smart Artillery Wagons.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
Re: [2.1.9] programmable speaker .alert_parameters.alert_message is read only?
Your code is still bugged, you are setting alert_message on a copy.
is bugged. In a correct code there will be somewhere
Code: Select all
.alert_parameters.alert_message = Code: Select all
.alert_parameters =

