Only called during plugin construction.
| 482 | |
| 483 | // Only called during plugin construction. |
| 484 | bool CPlugin::TryCompile() |
| 485 | { |
| 486 | char fullpath[PLATFORM_MAX_PATH]; |
| 487 | g_pSM->BuildPath(Path_SM, fullpath, sizeof(fullpath), "plugins/%s", m_filename); |
| 488 | |
| 489 | char loadmsg[255]; |
| 490 | m_pRuntime.reset(g_pPawnEnv->LoadBinaryFromFile(fullpath, loadmsg, sizeof(loadmsg))); |
| 491 | if (!m_pRuntime) { |
| 492 | EvictWithError(Plugin_BadLoad, "Unable to load plugin (%s)", loadmsg); |
| 493 | return false; |
| 494 | } |
| 495 | |
| 496 | // ReadInfo() sets its own error state. |
| 497 | if (!ReadInfo()) |
| 498 | return false; |
| 499 | |
| 500 | m_status = Plugin_Created; |
| 501 | return true; |
| 502 | } |
| 503 | |
| 504 | IPluginContext *CPlugin::GetBaseContext() |
| 505 | { |
no test coverage detected