GO

[Encerrado] Erro Ao Logar E No Distro

Por goesraphael1, 25 de out. de 2012 em Tópicos Sem Resposta

script
9
1.1k
25 de outubro de 2012 às 13:52

Galera, seguinte, Se eu crio um char com o nome por exemplo assim: " Druid'Show " com este apóstrofo no meio do nome ' , O char não loga no server e no distro aparece este erro:

 

[25/10/2012 13:59:17] Druid'druida has logged in.
[25/10/2012 13:59:17] mysql_real_query(): SELECT `points` FROM `players` WHERE `name` = 'Druid'druida'; - MYSQL ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'druida'' at line 1 (1064)

[25/10/2012 13:59:17] [Error - CreatureScript Interface]
[25/10/2012 13:59:17] data/creaturescripts/scripts/Skull.lua:onLogin
[25/10/2012 13:59:17] Description:
[25/10/2012 13:59:17] data/lib/004-database.lua:60: [Result:getDataInt] Result not set!
[25/10/2012 13:59:17] stack traceback:
[25/10/2012 13:59:17]	 [C]: in function 'error'
[25/10/2012 13:59:17]	 data/lib/004-database.lua:60: in function 'getDataInt'
[25/10/2012 13:59:17]	 data/lib/049-war.lua:15: in function 'getPlayerPoints'
[25/10/2012 13:59:17]	 data/creaturescripts/scripts/Skull.lua:2: in function <data/creaturescripts/scripts/Skull.lua:1>
[25/10/2012 13:59:17] Druid'druida has logged out.

[25/10/2012 13:59:18] [Error - CreatureScript Interface]
[25/10/2012 13:59:18] In a timer event called from:
[25/10/2012 13:59:18] data/creaturescripts/scripts/anti2.lua:onLogin
[25/10/2012 13:59:18] Description:
[25/10/2012 13:59:18] (internalGetPlayerInfo) Player not found when requesting player info #28

 

 

Alguém sabe arrumar isso para os players com esses nomes conseguirem logar?

Yan OliveiraY
25 de outubro de 2012 às 13:54

Tente dar espaço no 'Show assim : Druid 'Show.

25 de outubro de 2012 às 14:19

cara, o problema não é eu criar um char com espaço, preciso que funcione desse jeito... pois os players que entrarem no site para criar conta, se criarem com apóstrofo, vão tentar entrar, não vai dar e eles vão desistir de jogar..

Yan OliveiraY
25 de outubro de 2012 às 14:21

Poste seu login.lua.

25 de outubro de 2012 às 16:23
dofile("war.lua")

local texts = {
"Bem vindo ao "..getConfigValue("ownerName").."'s, segue a lista de todos comandos:",
"!online				-> Ver players online",
"!uptime				-> Ver UPTime do server",
"!frags				 -> Veja seus Frags",
"!t					 -> Digite !t e um numero EX: !t 1",
"!rank				  -> Ver os TOP Fraggers ",
"!setoutfit			 -> Salvar sua OUTFIT",
"!getoutfit			 -> Carregar sua OUTFIT",
"!go					-> Trocar para a mesma OUTFIT que o lider da party"
}

local config = {
loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}


function onLogin(cid)
local loss = getConfigValue('deathLostPercent')
if(loss ~= nil) then
	doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
end

local accountManager = getPlayerAccountManager(cid)
if(accountManager == MANAGER_NONE) then
	local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
	if(lastLogin > 0) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
		str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
	else
		str = str .. " Please choose your outfit."
		doPlayerSendOutfitWindow(cid)
	end

	doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
elseif(accountManager == MANAGER_NAMELOCK) then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
elseif(accountManager == MANAGER_ACCOUNT) then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
else
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
end

if(not isPlayerGhost(cid)) then
	doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end


  for t = 1, #texts do
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, texts[t])
end


registerCreatureEvent(cid, "startskills")
setPlayerPromotionLevel(cid, 1)

registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")
		registerCreatureEvent(cid, "Kill")
registerCreatureEvent(cid, "First Items")
		registerCreatureEvent(cid, "Skull")
				   registerCreatureEvent(cid, 'FLook')
registerCreatureEvent(cid, "Idle")
if(config.useFragHandler) then
	registerCreatureEvent(cid, "SkullCheck")
end

registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "AdvanceSave")
return true
end

Editado Outubro 25 por RaphaelGoes

Yan OliveiraY
25 de outubro de 2012 às 16:41

Este diretorio está certo:?

 

dofile("war.lua")

25 de outubro de 2012 às 19:56

Sim, ele fica na pasta data.

Yan OliveiraY
26 de outubro de 2012 às 19:28

Sua base é Sqlite ou Mysql?

5 anos depois...
StigalS
20 de abril de 2018 às 00:32
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.