Skip to content

Commit

Permalink
Fixed script path info of main.scm (#159)
Browse files Browse the repository at this point in the history
Documentation updates in CLEO_Utils.h
  • Loading branch information
MiranDMC authored Jun 23, 2024
1 parent 7a93a15 commit 0c368da
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
18 changes: 14 additions & 4 deletions cleo_sdk/CLEO_Utils.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
// some utilities usefull when creating CLEO plugins
// requires adding "CPools.cpp" from GTA Plugin SDK to the project
// Some optional utilities usefull when creating CLEO plugins
//
// Add following lines to "Additional Include Directories" in project config:
// $(PLUGIN_SDK_DIR)\plugin_sa\
// $(PLUGIN_SDK_DIR)\shared\game\
// $(PLUGIN_SDK_DIR)\plugin_sa\game_sa\
//
// Add following lines to "Preprocesor Definitions":
// GTASA
// TARGET_NAME=R"($(TargetName))"
//
// Depending on used functions, may require adding "CPools.cpp" from GTA Plugin SDK to the project files

#pragma once
#include "CLEO.h"
Expand All @@ -17,7 +27,7 @@ namespace CLEO
SHOW_ERROR(a,...) // message box, log to file
Macros to use inside opcode handler functions. Performs types validation, printing warnings and suspending script on critical errors.
Please mind those might expand into multiple lines, so should, for example, not be used as body of 'if' statements without brackets!
Please mind those expand into multiple lines, so CAN NOT be used in places where single code line is expected! (like 'if' condition body without brackets)
OPCODE_CONDITION_RESULT(value) // set result
OPCODE_SKIP_PARAMS(count) // ignore X params
Expand Down Expand Up @@ -196,7 +206,7 @@ namespace CLEO
ShowWindow(NULL, SW_MINIMIZE);
}

MessageBox(NULL, msg, "CLEO error", MB_SYSTEMMODAL | MB_TOPMOST | MB_ICONERROR | MB_OK);
MessageBoxA(NULL, msg, "CLEO error", MB_SYSTEMMODAL | MB_TOPMOST | MB_ICONERROR | MB_OK);

if (fullscreen)
{
Expand Down
2 changes: 1 addition & 1 deletion source/CScriptEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ namespace CLEO

if (CGame::bMissionPackGame == 0) // regular main game
{
MainScriptFileDir = FS::path(Filepath_Cleo).append("data\\script").string();
MainScriptFileDir = FS::path(Filepath_Root).append("data\\script").string();
MainScriptFileName = "main.scm";
}
else // mission pack
Expand Down

0 comments on commit 0c368da

Please sign in to comment.