# Using autotester with CJW's save system

**URL:** <https://forum.choiceofgames.com/t/using-autotester-with-cjws-save-system/1072>\
**Category:** Game Development\
**Created:** [January 11, 2013, 6:20pm UTC](https://forum.choiceofgames.com/t/using-autotester-with-cjws-save-system/1072 "2013-01-11T18:20:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bawpie](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/bawpie/32/343_2.png) [@bawpie](https://forum.choiceofgames.com/u/bawpie)\
**Post date:** [January 11, 2013, 6:20pm UTC](https://forum.choiceofgames.com/t/using-autotester-with-cjws-save-system/1072/1 "2013-01-11T18:20:33Z")

</div>

I mentioned in this thread that autotester doesn’t get on with CJW’s new save system (released January 9th) due to the \*sm commands not being recognised. If you’re using notepad++ for coding, these macros will \*comment and un \*comment out the offending commands which should make testing simpler.

The linked code ([https://dl.dropbox.com/u/11379019/COG/shortcuts.txt](https://dl.dropbox.com/u/11379019/COG/shortcuts.txt)) should be put inbetween the tags within the shortcut.xml found in your appdata (or application data folder) for notepad ++. On my PC (windows 8) the path for this file is : C:\Users\Kirsty\AppData\Roaming\otepad++

Note these are very basic macros (literally a recording of find and replace routine), and it’s possible to keep \*commenting out the commands so you could end up with \*comment\*comment\*sm\_init - if this is the case, you just have to run the uncomment macro until all \*comments have been removed. I don’t know enough about notepad++ macros to record anything more sophisticated I’m afraid!

Additionally, I added the following line to the beginning of my stats in the mygame.js file:

```
/\*Save system variables - to be turned on during testing ONLY\*/
savemod_slot_0: false
, savemod_slot_1: false
, savemod_slot_2: false
, savemod_slot_3: false

```

These should be commented out when testing is done (although I’m not sure if they’ll impact the save system if left live?). Also, you’ll need to add as many variables in as you do have save slots.

@fantom and @Marius both expressed an interest in this, but I didn’t want to clutter up @CJW’s original post([http://www.choiceofgames.com/forum/discussion/992/merry-christmas-cog-community-saving-system/#Item\_135](http://www.choiceofgames.com/forum/discussion/992/merry-christmas-cog-community-saving-system/#Item_135)).

Anyway, hope this is helpful to those interested.

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [January 11, 2013, 7:33pm UTC](https://forum.choiceofgames.com/t/using-autotester-with-cjws-save-system/1072/2 "2013-01-11T19:33:54Z")

</div>

Great! Although… IF you can, why don’t you record yourself finding and replacing the commands?

Find: \*sm\_save (match whole word)  
Replace: \*sm\_save with \*comment\*sm\_save

^Comment Macro

vUncomment Macro

Find: \*comment\*sm\_save (match whole word)  
Replace: \*comment\*sm\_save with \*sm\_save

It just means that you aren’t capable of double commenting, not a big deal, but if it’s not too hard to do it might be worth it! Thanks again for pointing this out and devising a solution 🙂

EDIT: Just realized that is probably exactly what you already did -.-’  
Just the ‘match whole word’ bit, if you can include that it’d be good. I don’t know much about Notepad++ macros.

---

<div class="post-metadata">

**Author:** ![CS\_Closet](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cs_closet/32/684_2.png) [@CS\_Closet](https://forum.choiceofgames.com/u/CS_Closet)\
**Post date:** [January 12, 2013, 2:06am UTC](https://forum.choiceofgames.com/t/using-autotester-with-cjws-save-system/1072/3 "2013-01-12T02:06:08Z")

</div>

@bawpie  
Thanks for sharing with everyone! This certainly makes the long auto-test process much easier.

---

<div class="post-metadata">

**Author:** ![bawpie](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/bawpie/32/343_2.png) [@bawpie](https://forum.choiceofgames.com/u/bawpie)\
**Post date:** [January 12, 2013, 4:51am UTC](https://forum.choiceofgames.com/t/using-autotester-with-cjws-save-system/1072/4 "2013-01-12T04:51:31Z")

</div>

@CJW - hah, that’s exactly what I did. I’m okay with VBA, but notepad++ macros are completely different from that - using ‘match whole word only’ in the find and replace screen still identifies the \*sm\_save even if it’s been commented…yesterday was the first time I used them, so my knowledge is very minimal.

If I could figure out how to check if \*comment\*sm\_save exists before commenting it again, that would do the trick.

---

<div class="post-metadata">

**Author:** ![Marius](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/marius/32/198466_2.png) [@Marius](https://forum.choiceofgames.com/u/Marius)\
**Post date:** [January 12, 2013, 5:29am UTC](https://forum.choiceofgames.com/t/using-autotester-with-cjws-save-system/1072/5 "2013-01-12T05:29:17Z")

</div>

Thanks, @bawpie. This works great!

---

<div class="post-metadata">

**Author:** ![bawpie](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/bawpie/32/343_2.png) [@bawpie](https://forum.choiceofgames.com/u/bawpie)\
**Post date:** [January 12, 2013, 5:39am UTC](https://forum.choiceofgames.com/t/using-autotester-with-cjws-save-system/1072/6 "2013-01-12T05:39:37Z")

</div>

@Marius - glad they work. 🙂
