Postado Março 27, 2018 7 anos Estou tenho problema com o site, baixei e coloquei dentro do xampp configurei o local do server certo e agora aparece isso Parse error: syntax error, unexpected '--' (T_DEC), expecting ';' in C:\xampp\htdocs\christibia\site\classes\configlua.php(56) : eval()'d code on line 1 na linha que diz ai seria isso $ret = @eval("return $value;"); mas nao sei resolver peço que me perdoe se postei errado alguma coisa. segue meu arquivo config.lua Spoiler -- Combat settings -- NOTE: valid values for worldType are: "pvp", "no-pvp" and "pvp-enforced" worldType = "pvp" hotkeyAimbotEnabled = true protectionLevel = 8 killsToRedSkull = 6 killsToBlackSkull = 10 --pzLocked = 60 * 1000 removeChargesFromRunes = true --timeToDecreaseFrags = 24 * 60 * 60 * 1000 --whiteSkullTime = 15 * 60 * 1000 --stairJumpExhaustion = 2 * 1000 experienceByKillingPlayers = false expFromPlayersLevelRange = 75 -- Connection Config -- NOTE: maxPlayers set to 0 means no limit ip = "25.8.61.116" bindOnlyGlobalAddress = false loginProtocolPort = 7171 gameProtocolPort = 7172 statusProtocolPort = 7171 maxPlayers = 2000 motd = "Bem vindo ao ChrisTibia!" onePlayerOnlinePerAccount = true allowClones = false serverName = "ChrisTibia & VieiraTibia" statusTimeout = 5 * 1000 replaceKickOnLogin = true maxPacketsPerSecond = 50 enableLiveCasting = true liveCastPort = 7173 -- Store in-Game Config coinPacketSize = 2 coinImagesURL = "http://25.8.61.116/christibia/store/" -- PVP-Expert Config expertPvp = false -- Depot Limit freeDepotLimit = 2000 premiumDepotLimit = 10000 depotBoxes = 17 -- 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 = "weekly" -- Item Usage timeBetweenActions = 200 timeBetweenExActions = 1000 -- Map -- NOTE: set mapName WITHOUT .otbm at the end mapName = "global" mapAuthor = "Cipsoft" -- Market marketOfferDuration = 30 * 24 * 60 * 60 premiumToCreateMarketOffer = false checkExpiredMarketOffersEachMinutes = 60 maxMarketOffersAtATimePerPlayer = 100 -- MySQL mysqlHost = "127.0.0.1" mysqlUser = "root" mysqlPass = "" mysqlDatabase = "christibia" mysqlPort = 3306 passwordType = "sha1" mysqlSock = "" -- Misc. allowChangeOutfit = true freePremium = true kickIdlePlayerAfterMinutes = 15 maxMessageBuffer = 4 emoteSpells = false classicEquipmentSlots = true allowWalkthrough = false -- Rates -- NOTE: rateExp is not used if you have enabled stages in data/XML/stages.xml rateExp = 999 * 5000 * 5000 * 5000 * 5000 rateSkill = 999 * 5000 * 5000 * 5000 * 5000 rateLoot = 4 rateMagic = 8 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 = true -- Status server information ownerName = "ChrisTibia" ownerEmail = "[email protected]" url = "http://25.8.61.116/christibia/" location = "Brasil" configlua.php Spoiler <?php if(!defined('INITIALIZED')) exit; class ConfigLUA extends Errors // NOT SAFE CLASS, LUA CONFIG CAN BE EXECUTED AS PHP CODE { private $config; public function __construct($path = false) { if($path) $this->loadFromFile($path); } public function loadFromFile($path) { if(Website::fileExists($path)) { $content = Website::getFileContents($path); $this->loadFromString($content); } else { new Error_Critic('#C-2', 'ERROR: <b>#C-2</b> : Class::ConfigLUA - LUA config file doesn\'t exist. Path: <b>' . $path . '</b>'); } } public function fileExists($path) { return Website::fileExists($path); } public function loadFromString($string) { $lines = explode("\n", $string); if(count($lines) > 0) foreach($lines as $ln => $line) { $tmp_exp = explode('=', $line, 2); if(count($tmp_exp) >= 2) { $key = trim($tmp_exp[0]); if(substr($key, 0, 2) != '--') { $value = trim($tmp_exp[1]); if(is_numeric($value)) $this->config[ $key ] = (float) $value; elseif(in_array(substr($value, 0 , 1), array("'", '"')) && in_array(substr($value, -1 , 1), array("'", '"'))) $this->config[ $key ] = (string) substr(substr($value, 1), 0, -1); elseif(in_array($value, array('true', 'false'))) $this->config[ $key ] = ($value == 'true') ? true : false; else { foreach($this->config as $tmp_key => $tmp_value): // load values definied by other keys, like: dailyFragsToBlackSkull = dailyFragsToRedSkull $value = str_replace($tmp_key, $tmp_value, $value); $ret = @eval("return $value;"); endforeach; if((string) $ret == '') // = parser error { new Error_Critic('', 'ERROR: <b>#C-1</b> : Class::ConfigLUA - Line <b>' . ($ln + 1) . '</b> of LUA config file is not valid [key: <b>' . $key . '</b>]'); } $this->config[ $key ] = $ret; } } } } } public function getValue($key) { if(isset($this->config[ $key ])) return $this->config[ $key ]; else new Error_Critic('#C-3', 'ERROR: <b>#C-3</b> : Class::ConfigLUA - Key <b>' . $key . '</b> doesn\'t exist.'); } public function isSetKey($key) { return isset($this->config[ $key ]); } public function getConfig() { return $this->config; } } Editado Março 27, 2018 7 anos por Chrisouzaprobr (veja o histórico de edições)
Postado Março 27, 2018 7 anos olá. configlua.php <?php if(!defined('INITIALIZED')) exit; class ConfigLUA extends Errors // NOT SAFE CLASS, LUA CONFIG CAN BE EXECUTED AS PHP CODE { private $config; public function __construct($path = false) { if($path) $this->loadFromFile($path); } public function loadFromFile($path) { if(Website::fileExists($path)) { $content = Website::getFileContents($path); $this->loadFromString($content); } else { new Error_Critic('#C-2', 'ERROR: <b>#C-2</b> : Class::ConfigLUA - LUA config file doesn\'t exist. Path: <b>' . $path . '</b>'); } } public function fileExists($path) { return Website::fileExists($path); } public function loadFromString($string) { $lines = explode("\n", $string); if(count($lines) > 0) foreach($lines as $ln => $line) { $tmp_exp = explode('=', $line, 2); if(count($tmp_exp) >= 2) { $key = trim($tmp_exp[0]); if(substr($key, 0, 2) != '--') { $value = trim($tmp_exp[1]); if(is_numeric($value)) $this->config[ $key ] = (float) $value; elseif(in_array(substr($value, 0 , 1), array("'", '"')) && in_array(substr($value, -1 , 1), array("'", '"'))) $this->config[ $key ] = (string) substr(substr($value, 1), 0, -1); elseif(in_array($value, array('true', 'false'))) $this->config[ $key ] = ($value == 'true') ? true : false; else { foreach($this->config as $tmp_key => $tmp_value) // load values definied by other keys, like: dailyFragsToBlackSkull = dailyFragsToRedSkull $value = str_replace($tmp_key, $tmp_value, $value); $ret = @eval("return $value;"); if((string) $ret == '') // = parser error { new Error_Critic('', 'ERROR: <b>#C-1</b> : Class::ConfigLUA - Line <b>' . ($ln + 1) . '</b> of LUA config file is not valid [key: <b>' . $key . '</b>]'); } $this->config[ $key ] = $ret; } } } } } public function getValue($key) { if(isset($this->config[ $key ])) return $this->config[ $key ]; else new Error_Critic('#C-3', 'ERROR: <b>#C-3</b> : Class::ConfigLUA - Key <b>' . $key . '</b> doesn\'t exist.'); } public function isSetKey($key) { return isset($this->config[ $key ]); } public function getConfig() { return $this->config; } }
Postado Março 27, 2018 7 anos Autor 2 minutos atrás, Dragon Ball Hiper disse: olá. configlua.php copiei o codigo e coloquei aqui e ta na mesma coisa
Postado Março 27, 2018 7 anos 1 minuto atrás, Chrisouzaprobr disse: copiei o codigo e coloquei aqui e ta na mesma coisa <?php if(!defined('INITIALIZED')) exit; class ConfigLUA extends Errors // NOT SAFE CLASS, LUA CONFIG CAN BE EXECUTED AS PHP CODE { private $config; public function __construct($path = false) { if($path) $this->loadFromFile($path); } public function loadFromFile($path) { if(Website::fileExists($path)) { $content = Website::getFileContents($path); $this->loadFromString($content); } else { new Error_Critic('#C-2', 'ERROR: <b>#C-2</b> : Class::ConfigLUA - LUA config file doesn\'t exist. Path: <b>' . $path . '</b>'); } } public function fileExists($path) { return Website::fileExists($path); } public function loadFromString($string) { $lines = explode("\n", $string); if(count($lines) > 0) foreach($lines as $ln => $line) { $tmp_exp = explode('=', $line, 2); if(count($tmp_exp) >= 2) { $key = trim($tmp_exp[0]); if(substr($key, 0, 2) != '--') { $value = trim($tmp_exp[1]); if(is_numeric($value)) $this->config[ $key ] = (float) $value; elseif(in_array(substr($value, 0 , 1), array("'", '"')) && in_array(substr($value, -1 , 1), array("'", '"'))) $this->config[ $key ] = (string) substr(substr($value, 1), 0, -1); elseif(in_array($value, array('true', 'false'))) $this->config[ $key ] = ($value == 'true') ? true : false; else { foreach($this->config as $tmp_key => $tmp_value) // load values definied by other keys, like: dailyFragsToBlackSkull = dailyFragsToRedSkull $value = str_replace($tmp_key, $tmp_value, $value); $ret = @eval("return $value;"); if((string) $ret == '') // = parser error { new Error_Critic('', 'ERROR: <b>#C-1</b> : Class::ConfigLUA - Line <b>' . ($ln + 1) . '</b> of LUA config file is not valid [key: <b>' . $key . '</b>]'); } $this->config[ $key ] = $ret; } } } } } public function getValue($key) { if(isset($this->config[ $key ])) return $this->config[ $key ]; else new Error_Critic('#C-3', 'ERROR: <b>#C-3</b> : Class::ConfigLUA - Key <b>' . $key . '</b> doesn\'t exist.'); } public function isSetKey($key) { return isset($this->config[ $key ]); } public function getConfig() { return $this->config; } } esse testei e está OK . Versão gesior ?
Postado Março 27, 2018 7 anos Autor baxei dessa parte e o Download V2 Download V2 Painel Admin News Ticker Top Level Bugs Removidos Download Website Download Database
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.