News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

Add a Marker

Started by railh, April 26, 2017, 05:34:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

railh

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?

Dwachs

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.
Parsley, sage, rosemary, and maggikraut.

jamespetts

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.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.