• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Windows Erro SQLite Console/GUI no recognizing player with name Mario'Luigi

samuel157

/root
Joined
Mar 19, 2010
Messages
518
Solutions
3
Reaction score
71
Location
São Paulo, Brazil
GitHub
Samuel10M
[26/01/2020 20:54:06] OTSYS_SQLITE3_PREPARE(): SQLITE ERROR: near "pala": syntax error (INSERT INTO "death_list" ("player_id", "date", "level", "killer_name") VALUES ('4491', '1580079246', '24931', 'Lord'pala. ') ; )

Erro with player name Lord'Pala Help
 
Solution
E
the escape string is exactly to prevent this error, you need to search for the script that is executing it and change this (example):

db.query("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `is_player`, `mostdamage_by`, `mostdamage_is_player`, `unjustified`, `mostdamage_unjustified`) VALUES (" .. playerGuid .. ", " .. os.time() .. ", " .. player:getLevel() .. ", " .. killerName .. ", " .. byPlayer .. ", " .. mostDamageName .. ", " .. byPlayerMostDamage .. ", " .. (unjustified and 1 or 0) .. ", " .. (mostDamageUnjustified and 1 or 0) .. ")")

into this:

db.query("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `is_player`, `mostdamage_by`, `mostdamage_is_player`, `unjustified`...
the escape string is exactly to prevent this error, you need to search for the script that is executing it and change this (example):

db.query("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `is_player`, `mostdamage_by`, `mostdamage_is_player`, `unjustified`, `mostdamage_unjustified`) VALUES (" .. playerGuid .. ", " .. os.time() .. ", " .. player:getLevel() .. ", " .. killerName .. ", " .. byPlayer .. ", " .. mostDamageName .. ", " .. byPlayerMostDamage .. ", " .. (unjustified and 1 or 0) .. ", " .. (mostDamageUnjustified and 1 or 0) .. ")")

into this:

db.query("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `is_player`, `mostdamage_by`, `mostdamage_is_player`, `unjustified`, `mostdamage_unjustified`) VALUES (" .. playerGuid .. ", " .. os.time() .. ", " .. player:getLevel() .. ", " .. db.escapeString(killerName) .. ", " .. byPlayer .. ", " .. db.escapeString(mostDamageName) .. ", " .. byPlayerMostDamage .. ", " .. (unjustified and 1 or 0) .. ", " .. (mostDamageUnjustified and 1 or 0) .. ")")

in your playerdeath.lua
 
Solution
Back
Top