4Maestro 8 #1 Oluşturuldu: Şubat 15, 2018 Merhaba Şuanda Geliştirmek İstedigim Source de otomatik lua okuma problemi var nasıl yapabilirim yardımcı olabilirminiz teşekkür ederim Mesajı raporla İletiyi paylaş Link to post Sitelerde Paylaş
KODevelopers 442 #2 Şubat 15, 2018 tarihinde gönderildi @ 4Maestro Merhaba LuaEngine.cpp ExecuteScript orası yer. Poyroz src kullanıyorsun onda son güncelleme tutmuyo.. Mesajı raporla İletiyi paylaş Link to post Sitelerde Paylaş
4Maestro 8 #3 Konu Sahibi Şubat 15, 2018 tarihinde gönderildi Alıntı@ 4Maestro Merhaba LuaEngine.cpp ExecuteScript orası yer. Poyroz src kullanıyorsun onda son güncelleme tutmuyo.. Srgame Paylaştigi Source Kullanıyorum :/ Mesajı raporla İletiyi paylaş Link to post Sitelerde Paylaş
KODevelopers 442 #4 Şubat 15, 2018 tarihinde gönderildi Srgame Paylaştigi Source Kullanıyorum :/ Anladım.. bunu bak eksik varsa ekle.. bool CLuaEngine::ExecuteScript(CUser * pUser, CNpc * pNpc, int32 nEventID, int8 bSelectedReward, const char * filename) { ScriptBytecodeMap::iterator itr; bool result = false; m_lock->AcquireReadLock(); itr = m_scriptMap.find(filename); if (itr == m_scriptMap.end()) { // Build full path to script std::string szPath = LUA_SCRIPT_DIRECTORY; szPath += filename; // Release the read lock (we're not reading anymore) m_lock->ReleaseReadLock(); // Attempt to compile BytecodeBuffer bytecode; bytecode.reserve(LUA_SCRIPT_BUFFER_SIZE); if (!SelectAvailableScript()->CompileScript(szPath.c_str(), bytecode)) { printf("ERROR: Could not compile Lua script."); printf("FILE: %s", szPath.c_str()); printf("USER: %s", pUser->GetName().c_str()); printf("ZONE: %d", pUser->GetZoneID()); printf("NPC ID: %d", pNpc->m_sSid); printf("-"); return false; } // Acquire the write lock (we're adding the compiled script) m_lock->AcquireWriteLock(); #if !defined(LUA_SCRIPT_CACHE_DISABLED) // Add the script to our map m_scriptMap[filename] = bytecode; #endif // Now that we have the bytecode, we can use it. result = SelectAvailableScript()->ExecuteScript(pUser, pNpc, nEventID, bSelectedReward, filename, bytecode); // Done using the lock. m_lock->ReleaseWriteLock(); } else { // Already have the bytecode, so now we need to use it. result = SelectAvailableScript()->ExecuteScript(pUser, pNpc, nEventID, bSelectedReward, filename, itr->second); // Done using the lock. m_lock->ReleaseReadLock(); } return result; } Mesajı raporla İletiyi paylaş Link to post Sitelerde Paylaş
4Maestro 8 #5 Konu Sahibi Şubat 15, 2018 tarihinde gönderildi AlıntıAnladım.. bunu bak eksik varsa ekle.. bool CLuaEngine::ExecuteScript(CUser * pUser, CNpc * pNpc, int32 nEventID, int8 bSelectedReward, const char * filename) { ScriptBytecodeMap::iterator itr; bool result = false; m_lock->AcquireReadLock(); itr = m_scriptMap.find(filename); if (itr == m_scriptMap.end()) { // Build full path to script std::string szPath = LUA_SCRIPT_DIRECTORY; szPath += filename; // Release the read lock (we're not reading anymore) m_lock->ReleaseReadLock(); // Attempt to compile BytecodeBuffer bytecode; bytecode.reserve(LUA_SCRIPT_BUFFER_SIZE); if (!SelectAvailableScript()->CompileScript(szPath.c_str(), bytecode)) { printf("ERROR: Could not compile Lua script."); printf("FILE: %s", szPath.c_str()); printf("USER: %s", pUser->GetName().c_str()); printf("ZONE: %d", pUser->GetZoneID()); printf("NPC ID: %d", pNpc->m_sSid); printf("-"); return false; } // Acquire the write lock (we're adding the compiled script) m_lock->AcquireWriteLock(); #if !defined(LUA_SCRIPT_CACHE_DISABLED) // Add the script to our map m_scriptMap[filename] = bytecode; #endif // Now that we have the bytecode, we can use it. result = SelectAvailableScript()->ExecuteScript(pUser, pNpc, nEventID, bSelectedReward, filename, bytecode); // Done using the lock. m_lock->ReleaseWriteLock(); } else { // Already have the bytecode, so now we need to use it. result = SelectAvailableScript()->ExecuteScript(pUser, pNpc, nEventID, bSelectedReward, filename, itr->second); // Done using the lock. m_lock->ReleaseReadLock(); } return result; } Saolasın baba bakiyorum Mesajı raporla İletiyi paylaş Link to post Sitelerde Paylaş
KODevelopers 442 #6 Şubat 15, 2018 tarihinde gönderildi Saolasın baba bakiyorum Çözüldüyse buraya yaz oke. Mesajı raporla İletiyi paylaş Link to post Sitelerde Paylaş
4Maestro 8 #7 Konu Sahibi Şubat 15, 2018 tarihinde gönderildi AlıntıÇözüldüyse buraya yaz oke. Tammdır Yazarım baba-- mesaja ek olarak --@KiraAmore61 Çözüldü Kardeşim Eline Sağlık Mesajı raporla İletiyi paylaş Link to post Sitelerde Paylaş
KODevelopers 442 #8 Şubat 15, 2018 tarihinde gönderildi Tammdır Yazarım baba -- mesaja ek olarak -- @KiraAmore61 Çözüldü Kardeşim Eline Sağlık Bende tahmin etmiştim : :frog: 1 Mesajı raporla İletiyi paylaş Link to post Sitelerde Paylaş
SnaypeR 66 #9 Şubat 15, 2018 tarihinde gönderildi Problem çözüldüğünden konu çözülmüş statüsüne alınmıştır. Mesajı raporla İletiyi paylaş Link to post Sitelerde Paylaş