| 1450 | #endif |
| 1451 | |
| 1452 | Error OScript::load_source_code(const String& p_path) { |
| 1453 | if (p_path.is_empty()) { |
| 1454 | return OK; |
| 1455 | } |
| 1456 | |
| 1457 | const OScriptSource new_source = OScriptSource::load(p_path); |
| 1458 | if (!new_source.is_valid()) { |
| 1459 | return ERR_FILE_CANT_OPEN; |
| 1460 | } |
| 1461 | |
| 1462 | set_source(new_source); |
| 1463 | path = p_path; |
| 1464 | path_valid = true; |
| 1465 | |
| 1466 | return OK; |
| 1467 | } |
| 1468 | |
| 1469 | #ifdef DEV_TOOLS |
| 1470 | String OScript::dump_compiled_state() { |
no test coverage detected