This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

This example from your Docs»Step by step»Scripting (continued) doesn't work:

A simple way to test this is to create a scene with a single Label node, with the following script:

extends Label

var accum=0

func _process(delta):
    accum += delta
    text = str(accum) # text is a built-in label property

enter link description here

in Engine by (16 points)

What do you mean by "doesn't work"? What happens?
Edit: your screenshot didn't show, I had a look

3 Answers

0 votes

Follow the link at the question. This is a screenshot.

by (16 points)
0 votes

The tutorial you followed is for Godot 3.0. You are using 2.1.4.

by (29,510 points)
0 votes

You are seeing 3.0 example, but using 2.x.
that's for 3.0
if you want to do it, set_text(str(accum)) instead of text = str(accum)

I think the Docs is updated to latest because it's about to release 3.0
if you want 2.x documents, see this.

http://docs.godotengine.org/en/2.1/learning/step_by_step/scripting_continued.html

just change stable to 2.1 on URL.
docs.godotengine.org/en/stable -> 2.1/learning/stepbystep/

by (9,800 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.