[Mod] Emoji [emoji]

User avatar
LMD
Member
Posts: 1397
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: [Mod] Emoji [emoji]

by LMD » Post

You have to escape it for the formspec : Minetest Lua API
When displaying text which can contain formspec code, e.g. text set by a player,
use `minetest.formspec_escape`.
My stuff: Projects - Mods - Website

User avatar
rubenwardy
Moderator
Posts: 6978
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: [Mod] Emoji [emoji]

by rubenwardy » Post

bosapara wrote:
Wuzzy wrote: - The shortcuts are also inconsistent. Some use noses, some don't.

Each text smile should be original, if you have ":)", so ">:)" will not work.

PS Tooltips won't work with text smiles like ";)", minetest give back an error.
Naughty, sounds like you're not escaping your formspecs.

"tooltip[name;", minetest.formspec_escape(";)"), "]"
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
LMD
Member
Posts: 1397
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: [Mod] Emoji [emoji]

by LMD » Post

rubenwardy wrote: "tooltip[name;", minetest.formspec_escape(";)"), "]"
Needs to be "tooltip[name;" .. minetest.formspec_escape(";)") .. "]" or table.concat({"tooltip[name;", minetest.formspec_escape(";)"), "]"})
My stuff: Projects - Mods - Website

User avatar
bosapara
Member
Posts: 637
Joined: Fri Apr 07, 2017 08:49

Re: [Mod] Emoji [emoji]

by bosapara » Post

LMD, rubenwardy

Thanks for advances, will use it.

User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

Re: [Mod] Emoji [emoji]

by FreeGamers » Post

bosapara, I think this stopped working with chat strings in 5.2.0-dev?
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

Post Reply

Who is online

Users browsing this forum: No registered users and 47 guests