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

TFS exe not launching

SnakeFist

New Member
Joined
Apr 18, 2024
Messages
9
Reaction score
1
GitHub
jnibali
Hi everyone I am trying to setup my TFS and have gone through all the steps. I was able to setup a SQL with UniServer Zero, and am able to compile the TFS source in visual studio. I also created the web interface(using myaac) that has my account created as well. However the web interface shows the server as offline, and when I go to launch the exe in the directory. It only opens for half a second before disapearing.

I have already looked around and tried the following
  • Made sure MySQL server and config.lua are using the same port
  • compiled the source with this solution
  • Checked my apache and SQL logs but could not find any error codes

If anyone has any idea on what could be causing this, please let me know.
config.lua is below

Lua:
-- Combat settings
-- NOTE: valid values for worldType are: "pvp", "no-pvp" and "pvp-enforced"
worldType = "pvp"
hotkeyAimbotEnabled = true
protectionLevel = 1
killsToRedSkull = 3
killsToBlackSkull = 6
pzLocked = 60000
removeChargesFromRunes = true
timeToDecreaseFrags = 24 * 60 * 60 * 1000
whiteSkullTime = 15 * 60 * 1000
stairJumpExhaustion = 2000
experienceByKillingPlayers = false
expFromPlayersLevelRange = 75
passwordType = "sha1"


-- Connection Config
-- NOTE: maxPlayers set to 0 means no limit
ip = "127.0.0.1"
bindOnlyGlobalAddress = false
loginProtocolPort = 7171
gameProtocolPort = 7172
statusProtocolPort = 7171
maxPlayers = 0
motd = "Welcome to The Forgotten Server!"
onePlayerOnlinePerAccount = true
allowClones = false
serverName = "Forgotten"
statusTimeout = 5000
replaceKickOnLogin = true
maxPacketsPerSecond = 25

-- Deaths
-- NOTE: Leave deathLosePercent as -1 if you want to use the default
-- death penalty formula. For the old formula, set it to 10. For
-- no skill/experience loss, set it to 0.
deathLosePercent = -1

-- Houses
-- NOTE: set housePriceEachSQM to -1 to disable the ingame buy house functionality
housePriceEachSQM = 1000
houseRentPeriod = "never"

-- Item Usage
timeBetweenActions = 200
timeBetweenExActions = 1000

-- Map
-- NOTE: set mapName WITHOUT .otbm at the end
mapName = "forgotten"
mapAuthor = "Komic"

-- Market
marketOfferDuration = 30 * 24 * 60 * 60
premiumToCreateMarketOffer = true
checkExpiredMarketOffersEachMinutes = 60
maxMarketOffersAtATimePerPlayer = 100

-- MySQL
mysqlHost = "127.0.0.1"
mysqlUser = "root"
mysqlPass = "Romeo"
mysqlDatabase = "testserver"
mysqlPort = 3306
mysqlSock = ""

-- Misc.
allowChangeOutfit = true
freePremium = false
kickIdlePlayerAfterMinutes = 15
maxMessageBuffer = 4
emoteSpells = false
classicEquipmentSlots = false

-- Rates
-- NOTE: rateExp is not used if you have enabled stages in data/XML/stages.xml
rateExp = 5
rateSkill = 3
rateLoot = 2
rateMagic = 3
rateSpawn = 1

-- Monsters
deSpawnRange = 2
deSpawnRadius = 50

-- Stamina
staminaSystem = true

-- Scripts
warnUnsafeScripts = true
convertUnsafeScripts = true

-- Startup
-- NOTE: defaultPriority only works on Windows and sets process
-- priority, valid values are: "normal", "above-normal", "high"
defaultPriority = "high"
startupDatabaseOptimization = false

-- Status server information
ownerName = ""
ownerEmail = ""
url = "https://otland.net/"
location = "Sweden"
 
Open up a fresh notepad.

Insert this:


Lua:
@echo off
cmd /k forgotten.exe

make sure the name is the same as you're exe you are trying to run, then click save. Save it in the folder with your exe, save it as start.bat.

Once you have saved the file as start.bat, then double click on it to run it. If you did everything correctly, the window will now not close on you before you get a chance to read the error.

What does the error say?
 
It only opens for half a second before disapearing.
Your computer is not compatible with the executable you generated, so you should switch to SSE2 and recompile again, and then test it... The problem is already solved!
 
Or uniserver make sure to not change password any time u run it because it resets access to sql for outside apps
 
Hi
To clarify more I am not using a exe file generated by the source code. I have the source code compiled, but using the exe from TFS GitHub zip file. Is this a problem? Should I generate my own exe and replace the one I have now in the directory?
 
Hi
To clarify more I am not using a exe file generated by the source code. I have the source code compiled, but using the exe from TFS GitHub zip file. Is this a problem? Should I generate my own exe and replace the one I have now in the directory?
yes. when you compile you are creating your own .exe, and should use that.
 
yes. when you compile you are creating your own .exe, and should use that.
The reason I did not do this before was because when I ran the server through visual studio I was given a error that the config.lua file was missing. Is their a specific way to generate the exe from source?
 
The reason I did not do this before was because when I ran the server through visual studio I was given a error that the config.lua file was missing. Is their a specific way to generate the exe from source?
when you run it "through visual studio" it is launching the exe in the folder it outputs it in, which is not the same folder as your config.lua and that is the only reason it didn't find it, if you wish to debug with visual studio, just open visual studio, and then drop the exe you want to run into visual studio and it will run it while debugging for you (assuming you have enabled symbols in your exe)
 
Back
Top