Uber Noob Code help

So i’m tasked with making a text field and typing in a username and then have it print out the username in reverse. So far, i was able to make the text field and submit button, but for the life of me, i can’t get it to reverse. I thought that i would have to use string.reverse() but that didn’t really seem to help. I’ve scrapped down my code to the bare basics of what i have left (After deleting the rest). I entered this class about 3 months late so i’m really trying hard to catch up but i don’t really have any help.

local NameInstructions = display.newText(“Enter your First Name”, 350, 150, native.systemFont, 24)

local userName = native.newTextField(350, 250, 350, 50)

userName.inputType = “default”

------------Submit Button------------

local submit = display.newImage(“submit.png”)

submit.x = display.contentWidth/2

submit.y = display.contentHeight-100


—Deleted all below—

If anyone can help me with the part where the username is printed backwards, it’ll help. It may not even be string.reverse(). That’s just all i can find.

Since this appears to be a class, I do not want to just give you the solution ;) , but I would be curious to see the string.reverse() code you used, and if you got any errors.

string.reverse() will absolutely print your string in reverse… I use it regularly in my live game.

s = string.reverse("abcde") print(s)

will print edcba. Not sure what the problem is here?

Since this appears to be a class, I do not want to just give you the solution ;) , but I would be curious to see the string.reverse() code you used, and if you got any errors.

string.reverse() will absolutely print your string in reverse… I use it regularly in my live game.

s = string.reverse("abcde") print(s)

will print edcba. Not sure what the problem is here?