Search found 7 matches

by Flandre
Mon Oct 19, 2020 7:19 am
Forum: Support and Development
Topic: I searched but no answer so I have to come here and asking this coding problem
Replies: 9
Views: 10700

Re: I searched but no answer so I have to come here and asking this coding problem

Okay, that I understand. But why do you want to do that? What effect do you want to achieve? Do you need a resizeable textbox? Um, long text will be out of textbox(with a fixed size) if without word wrap, anyway it can build a function for the problem so doesn't matter anymore, it may be better but...
by Flandre
Sat Oct 17, 2020 2:19 am
Forum: Support and Development
Topic: I searched but no answer so I have to come here and asking this coding problem
Replies: 9
Views: 10700

Re: I searched but no answer so I have to come here and asking this coding problem

Building newFormatTextObject dircetly function eg. function love.graphics.newFText(cfont,ctext,textObjectName) textObjectName=love.graphics.newText(cfont,tostring(ctext)) textObjectName:setf(tostring(ctext),500,"left") return textObjectName end nn2=love.graphics.newFText(font,temp1,nn2) fu...
by Flandre
Sat Oct 17, 2020 1:59 am
Forum: Support and Development
Topic: I searched but no answer so I have to come here and asking this coding problem
Replies: 9
Views: 10700

Re: I searched but no answer so I have to come here and asking this coding problem

For others, codes still has a incorrect point, should using nn1:seft() not nn1=nn1:setf() because Text:setf() returns nothing that makes nn1 = nothing. temp1="first neko ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss" nn1=love.graphics.newText(font,tostring(temp1)) nn1:...
by Flandre
Sat Oct 17, 2020 1:35 am
Forum: Support and Development
Topic: I searched but no answer so I have to come here and asking this coding problem
Replies: 9
Views: 10700

Re: I searched but no answer so I have to come here and asking this coding problem

Ok......Thanks for Xugro, All the thanks to you, I understand, needs "left" not left, now works, thank you, thank you! now everything be fine :)
by Flandre
Sat Oct 17, 2020 1:20 am
Forum: Support and Development
Topic: I searched but no answer so I have to come here and asking this coding problem
Replies: 9
Views: 10700

Re: I searched but no answer so I have to come here and asking this coding problem

Anyone could run this scrpit

font = love.graphics.getFont()
font = love.graphics.setNewFont(24)
nn1=love.graphics.newText(font,"222")
nn1=nn1:setf("111",500,left)

always reports: main.lua:4: bad argument #3 to 'setf' (string expected, got nil)
by Flandre
Sat Oct 17, 2020 12:43 am
Forum: Support and Development
Topic: I searched but no answer so I have to come here and asking this coding problem
Replies: 9
Views: 10700

Re: I searched but no answer so I have to come here and asking this coding problem

If you take a look at the wiki entry for Text:setf : You need to give the function three parameters: I added 3rd parameter (I deleted it before post problem on forum because I saw it still reports same error.) I tried it again in past seconds and still reports....ok, a little difference, it reports...
by Flandre
Fri Oct 16, 2020 5:42 pm
Forum: Support and Development
Topic: I searched but no answer so I have to come here and asking this coding problem
Replies: 9
Views: 10700

I searched but no answer so I have to come here and asking this coding problem

Hi everyone hope this is simple..... temp1="first neko" nn1=love.graphics.newText(font,tostring(temp1)) nn1=nn1:setf("111",500) always report argument #3 to 'setf' (string expected, got no value) Do I have a understanding-problem with "textstring" of "Text:setf( te...