Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

help for print command 1.5.2(18)

edited June 2013 in Bugs Posts: 68

Its probably because I am very new to CODEA but I can't get help regarding the print f (eye button - type print in the search field - get no response)


  • edited June 2013 Posts: 1,976

    I don't believe Lua has a printf function, just print. To concatonate a value to a string use .. i.e.

    value = 10
    print("The value is " .. value .. "!")
  • dave1707dave1707 Mod
    Posts: 7,807

    You might want to look at the string.format() command under the Lua tab.

  • Posts: 68

    Please ignore the single f after print in my question.
    I have wondred about options of the print command.

    print (pos.x) ....

  • Posts: 1,976

    Oh, I thought you meant printf, because that's a thing in some programming languages...

    There's not much to the print function, you just call print(String). It's the String that can be complicated.

  • edited December 2017 Posts: 1,325
    @DaDo - may be wrong but do you want to print to the screen at a set position?

    print() outputs text to the sidebar.

    Use text("string of choice", pos.x, pos.y) to place text on the main screen. Use fill() for the colour and fontSize() for the size of your font.
  • edited December 2017 Posts: 1,325
    All - oops my android phone lists threads in reverse order. Can this be corrected?
Sign In or Register to comment.