• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved TFS 0.3.6 problem ; /

Status
Not open for further replies.

Lord Ast

New Member
Joined
Jan 13, 2013
Messages
19
Reaction score
0
Location
Poland
Hello Everyone.

I'm newbie in TFS but i wanna create my own OTS, not for money but for players..

When i run ots i get Error in TFS:

ERROR: Failed to load players record!

What i should do with that error? ; /

I can't find answer on Otland ehh


Sorry for my English.

Regards!
 
do you have this in the globalevents > scripts?


record.lua
LUA:
function onRecord(current, old, cid)
	db.executeQuery("INSERT INTO `server_record` (`record`, `world_id`, `timestamp`) VALUES (" .. current .. ", " .. getConfigValue('worldId') .. ", " .. os.time() .. ");")
	addEvent(doBroadcastMessage, 150, "New record: " .. current .. " players are logged in.", MESSAGE_STATUS_DEFAULT)
end
 
try to replace it with this one

record.lua
LUA:
function onRecord(current, old, cid)
	db.executeQuery("INSERT INTO `server_record` (`record`, `world_id`, `timestamp`) VALUES (" .. current .. ", " .. getConfigValue('worldId') .. ", " .. os.time() .. ");")
	addEvent(doBroadcastMessage, 150, "New record: " .. current .. " players are logged in.", MESSAGE_STATUS_DEFAULT)
end

and tell me if it worked please.
 
This is my login.lua

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

registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildMotd")

registerCreatureEvent(cid, "Idle")
if(config.useFragHandler) then
registerCreatureEvent(cid, "SkullCheck")
end

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

- - - Updated - - -

execute this in your database and try again.

SQL:
TRUNCATE TABLE `server_record`

Let me know if it worked.

I don't understand what i must do.. ; /
 
ehh i still get this error...

[25/02/2013 21:51:36] > ERROR: Failed to load players record!

- - - Updated - - -

I try to change Log folder and login.lua from another tfs but i still get this fck error...

Anybody can Help Me?.

- - - Updated - - -

oh Come On ! :D

- - - Updated - - -

Nobody don't know how fix this error?
 
Last edited:
You are probably missing table from database.
Code:
CREATE TABLE `server_record`
(
        `record` INT NOT NULL,
        `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0,
        `timestamp` BIGINT NOT NULL,
        UNIQUE (`record`, `world_id`, `timestamp`)
) ENGINE = InnoDB;

INSERT INTO `server_record` VALUES (0, 0, 0);
 
  • Like
Reactions: Sun
thx for answer but now i don't have time becouse i move to new house u understand... But when i find sec for check it i give answer here.

Regards.

Sorry for my English ^^
 
You are probably missing table from database.
Code:
CREATE TABLE `server_record`
(
        `record` INT NOT NULL,
        `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0,
        `timestamp` BIGINT NOT NULL,
        UNIQUE (`record`, `world_id`, `timestamp`)
) ENGINE = InnoDB;

INSERT INTO `server_record` VALUES (0, 0, 0);

Worked on Avesta 0.64
Thx =D
 
Hello Back.

I have table "server_record"
I try to create "player_record" and "players_record" and i still have this problem fck ; /

I have new idea, i try and give answer here ;)

- - - Updated - - -

YEA I DO IT ! :D

Thread can be closed.

Regards and ths for asnswers.
 
Status
Not open for further replies.
Back
Top