The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Topic started by: railh on April 26, 2017, 05:34:35 PM

Title: Add a Marker
Post by: railh on April 26, 2017, 05:34:35 PM
I try to add a marker via a scenario (simutrans-extended):

function start() {
    setlabels()
}

function setlabels() {
    label_x.create(coord(997,369), player_x (0),"Text")
}


And get: "Error: [the index 'label_x' does not exist]"

What am I doing wrong?
Title: Re: Add a Marker
Post by: Dwachs on April 26, 2017, 07:13:25 PM
It seems that simutrans-extended did not port some parts of the scripting api. This would be script/api/api_map_objects.cc in this case.
Title: Re: Add a Marker
Post by: jamespetts on April 29, 2017, 03:18:47 PM
Indeed: I have not ported a great deal of the scripting API, as it is highly complex and Extended is quite different such that a huge amount of time adapting it would be necessary.

If anyone would like to integrate the scripting code into Extended, however, I should happily incorporate those changes into the main Extended code provided that it works.