From 7a4ab5908978b3b0992feef76f7143a274117780 Mon Sep 17 00:00:00 2001 From: NovaRain Date: Sun, 13 Aug 2017 11:38:18 +0800 Subject: [PATCH] Added missing description for set_car_current_town. Removed trailing spaces in MetaruleOp.hpp. --- artifacts/scripting/sfall function notes.txt | 3 +++ sfall/ScriptOps/MetaruleOp.hpp | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/artifacts/scripting/sfall function notes.txt b/artifacts/scripting/sfall function notes.txt index a8dd1bcc..2c21cb44 100644 --- a/artifacts/scripting/sfall function notes.txt +++ b/artifacts/scripting/sfall function notes.txt @@ -106,6 +106,9 @@ array - array ID to be used with array-related functions (actually an integer) > 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. +> void set_car_current_town(int town) +- changes the current town index for the player's car + > int get_ini_setting(string setting) - 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. diff --git a/sfall/ScriptOps/MetaruleOp.hpp b/sfall/ScriptOps/MetaruleOp.hpp index 43e06997..e8ce8237 100644 --- a/sfall/ScriptOps/MetaruleOp.hpp +++ b/sfall/ScriptOps/MetaruleOp.hpp @@ -75,7 +75,7 @@ static void sf_test() { } } sstream << ")"; - + sf_test_stringBuf = sstream.str(); opHandler.setReturn(sf_test_stringBuf.c_str()); } @@ -127,8 +127,8 @@ static bool ValidateMetaruleArguments(const SfallMetarule* metaruleInfo) { int argCount = opHandler.numArgs(); if (argCount < metaruleInfo->minArgs || argCount > metaruleInfo->maxArgs) { opHandler.printOpcodeError( - "sfall_funcX(\"%s\", ...) - invalid number of arguments (%d), must be from %d to %d.", - metaruleInfo->name, + "sfall_funcX(\"%s\", ...) - invalid number of arguments (%d), must be from %d to %d.", + metaruleInfo->name, argCount, metaruleInfo->minArgs, metaruleInfo->maxArgs); @@ -163,7 +163,7 @@ static void _stdcall op_sfall_metarule_handler() { } else { opHandler.printOpcodeError("sfall_funcX(name, ...) - name '%s' is unknown.", name); } - } else { + } else { opHandler.printOpcodeError("sfall_funcX(name, ...) - name must be string."); } }