• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Interface] FileGen

This is a simple (but fun-to-use) interface for the Preload-bug:

JASS:
/****************************
*
*   FileGen
*   v1.0.0.0
*   By Magtheridon96
*
*   - Used to create files on player's computer.
*
*   API:
*   ----
*
*       - function ResetBuffer takes nothing returns nothing
*           - Clears text buffer
*       - function NewFile takes nothing returns nothing
*           - Allows you to add text to the file
*       - function AddTextLine takes string s returns nothing
*           - Adds line of text
*       - function SaveFile takes string s returns nothing
*           - Saves a file to the computer. (Requires type)
*
****************************/
library FileGen

    function ResetBuffer takes nothing returns nothing
        call PreloadGenClear()
    endfunction

    function NewFile takes nothing returns nothing
        call PreloadGenStart()
    endfunction

    function AddTextLine takes string s returns nothing
        call Preload("\")\n"+s+"\n//")
    endfunction

    function SaveFile takes string s returns nothing
        call PreloadGenEnd(s)
    endfunction

endlibrary

Feel free to comment..
 
Last edited:
Level 7
Joined
Dec 3, 2006
Messages
339
Printing a save-code out on a .txt file would be easier for the player than having them screenshot it and type it all out.
 
If you want to ask DoctorGester to update his system, you can ask. It's not like he's inactive since he's even replied here.

However, I don't think this offers anything that his log doesn't. I'm not going to be outputting scripts for example, and if you were then you would want to edit his system for your own personal uses. I honestly feel this doesn't belong.

Graveyarded.
 
Top