• 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!

[Error] Saving items

Falconmax

New Member
Joined
Dec 12, 2007
Messages
84
Reaction score
0
I sometimes get this error while saving, seems to happen only with runes.

MySQL ERROR mysql_real_query: INSERT INTO `player_items` (`player_id`, `pid`, `sid`, `itemtype`, `count`, `attributes` ) VALUES (4,109,118,2273,10,' n\') 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 '' n\')' at line 1

Seems to be an error saving the attributes of the item. After that, if the server is closed and re opened, the player loses those runes, because they couldn't save, so it's actually a problem.
 
Yes thats true. I was have same problem. But actually i don't know 100% be what it is made. I just suggest you - don't reload nothink when server online - it can lost actually player items or somethink. I think it was problem with it, becouse actually i haven't it after last char reset ;)
 
what version you use? and you started this database with what version?
 
i have this problem

in use

/reload

i have db 0.26

and use tfs 0.28

this bug is only . after using command /reload
 
Thanks for the data, won't use reload anymore I guess :S

@Talaturen, please check this when you got sometime, it's kinda upsetting to be losing runes all the time :s I'll try not to use the /reload command and see what's the effect, I'll tell you later.

Regards.
 
Last edited:
i have this problem

in use

/reload

i have db 0.26

and use tfs 0.28

this bug is only . after using command /reload

/reload what?

All you type is /reload and it appears?
 
I can't actually check, but as i good remember i was mostly reloading all, and i don't want make problem, so wait for responds from other.

Btw. Reloading Talkactions don't work. Tried many times from GUI, and online in game: /reload talk. I'm 100% sure it doesn't work. I tried changing somethink in some talkactions scripts and it doesn't changed after reloading.
 
/reload talk only reloads talkactions.xml, it's a known issue.
 
all /reloads config,move, talk .ETC

make bugs in serve

Actually, it's only /reload config, and I've fixed it, just not commited yet.
 
Has this something to do with

WARNING: Serialize error in IOLoginData::loadItems
 
Hello. After I stopped used the /reload command, definitely, runes are saving fine now. And I'm using the latest version (0.2.8). If I should redownload tell me please :)

PS: may I also ask what's the LUA function for learn spell? Is it learnSpell(cid, words) or...?
 
Last edited:
Don't redownload, it's no difference, simply wait until 0.2.9 is released.

Example of NPC script of spell seller (light healing spell only)
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
local talkNode = 0
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid)			npcHandler:onCreatureAppear(cid)			end
function onCreatureDisappear(cid)		npcHandler:onCreatureDisappear(cid)			end
function onCreatureSay(cid, type, msg)	npcHandler:onCreatureSay(cid, type, msg)	end
function onThink()						npcHandler:onThink()						end

local node1 = keywordHandler:addKeyword({'light healing'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to learn light healing for 170 gold?'})
        node1:addChildKeyword({'yes'}, StdModule.buySpell, {npcHandler = npcHandler, spellName = "light healing", price = 170, vocation = 9, premium = 0, level = 1})
        node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Too expensive for you.. eh? I am selling spells, what are you expecting the price to be!', reset = true})

npcHandler:addModule(FocusModule:new())
 
Thanks both of you, but I want to know the LUA learnspell command, for a quest, not for a NPC. Is there any?
 
Back
Top