I want to complete the FiveM Lua syntax

106 views Asked by At

This is the part of the string inside the "". I want to know if this is okay.

"[[�����������"

I want to put this inside the string "" is redundant, is there any way?

"`,6<,futb=!;/2f*:=

enter image description here

I want to put the two values above in a TriggerServerEvent("") function that exists in a game called FiveM.

To convert that value to a TriggerServerEvent, it must be created as follows

TriggerServerEvent(""`,6<,futb=!;/2f*:=", "[[�����������", ,1573218749406,-1,"T1","Dances")

Let me know what's wrong with this syntax

1

There are 1 answers

0
Wh1t3rabbit On

To include a double quote (") within a Lua string the character must be escaped. Escaping a character means the character will be treated as part of the string, rather than a Lua instruction. To escape a character place a backslash (\) in front of it, like so:

local message = "he said \"bye\" and left"
print(message)
--Output would be: he said "bye" and left