Added missing description for set_car_current_town.

Removed trailing spaces in MetaruleOp.hpp.
This commit is contained in:
NovaRain
2017-08-13 11:38:18 +08:00
parent e505e204cb
commit 7a4ab59089
2 changed files with 7 additions and 4 deletions
@@ -106,6 +106,9 @@ array - array ID to be used with array-related functions (actually an integer)
> int get_npc_level(string npc) > int get_npc_level(string npc)
- also takes the npc name as an argument, and returns the npc's current level. Again, the npc needs to be in your party. - also takes the npc name as an argument, and returns the npc's current level. Again, the npc needs to be in your party.
> void set_car_current_town(int town)
- changes the current town index for the player's car
> int get_ini_setting(string setting) > int get_ini_setting(string setting)
- reads an integer value from an ini file in the fallout directory. - reads an integer value from an ini file in the fallout directory.
- It only takes a single argument; seperate the file name, section and key with a '|' character; e.g. 'myvar:=get_ini_setting("myini.ini|mysec|var1")' If the file or key cannot be found, -1 is returned. - It only takes a single argument; seperate the file name, section and key with a '|' character; e.g. 'myvar:=get_ini_setting("myini.ini|mysec|var1")' If the file or key cannot be found, -1 is returned.
+4 -4
View File
@@ -75,7 +75,7 @@ static void sf_test() {
} }
} }
sstream << ")"; sstream << ")";
sf_test_stringBuf = sstream.str(); sf_test_stringBuf = sstream.str();
opHandler.setReturn(sf_test_stringBuf.c_str()); opHandler.setReturn(sf_test_stringBuf.c_str());
} }
@@ -127,8 +127,8 @@ static bool ValidateMetaruleArguments(const SfallMetarule* metaruleInfo) {
int argCount = opHandler.numArgs(); int argCount = opHandler.numArgs();
if (argCount < metaruleInfo->minArgs || argCount > metaruleInfo->maxArgs) { if (argCount < metaruleInfo->minArgs || argCount > metaruleInfo->maxArgs) {
opHandler.printOpcodeError( opHandler.printOpcodeError(
"sfall_funcX(\"%s\", ...) - invalid number of arguments (%d), must be from %d to %d.", "sfall_funcX(\"%s\", ...) - invalid number of arguments (%d), must be from %d to %d.",
metaruleInfo->name, metaruleInfo->name,
argCount, argCount,
metaruleInfo->minArgs, metaruleInfo->minArgs,
metaruleInfo->maxArgs); metaruleInfo->maxArgs);
@@ -163,7 +163,7 @@ static void _stdcall op_sfall_metarule_handler() {
} else { } else {
opHandler.printOpcodeError("sfall_funcX(name, ...) - name '%s' is unknown.", name); opHandler.printOpcodeError("sfall_funcX(name, ...) - name '%s' is unknown.", name);
} }
} else { } else {
opHandler.printOpcodeError("sfall_funcX(name, ...) - name must be string."); opHandler.printOpcodeError("sfall_funcX(name, ...) - name must be string.");
} }
} }