lua - Unfinished long string near <eof> -
function writefloat([=[==[===[====["game.exe"+xxxxxxxx]+xxx====]+xxx===]+xxx==]+xxx=]+xxx, trackbar_getposition(trainerform_cetrackbar1)) end gives me error
[string "--code..."]:4: unfinished long string near
lua has "long strings", induced syntax of [=*[, "=*" means "zero or more = characters". [[ begins long string, [==[ or [=[, in case.
a long string named because accepts every character between inducing syntax , terminating syntax. allows useful things add verbatim xml, c++, or lua code within lua script literal string.
the terminating syntax ]=*], "=*" means the exact same number of = characters used induce long string. if start [=[, long string only end ]=]. ]] , ]====] or other terminus not end long string; they'll taken verbatim string.
so this:
local lit = [=[long string]==]=] results in lit taking value long string]==.
in code, never see ]=] sequence. have ====] , similar things, don't start ] character.
it illegal start long string never ends in lua script. hence compile error.
Comments
Post a Comment