information
What exactly is WriteDifferent?
- WriteDifferent is a module that allows you to create new languages in lua
- this module is not even close to finished and it won’t have everything you need to add everything you want yet
What can WriteDifferent do so far?
- WriteDifferent can make functions, libraries, functions that can be added into the libraries, variables, and even more
- you can create more then one language
- WriteDifferent allows strings, numbers, booleans, functions, variables, tables, math operations, and nil as arguments
What are the functions for WriteDifferent?
--[[
Module:AddNewLanguage("LanguageName") returns the language
Module["LanguageName"]:AddNewLibrary("LibraryName") returns the library
Module["LanguageName"]:ChangeHolders("StartHolder", "EndHolder") returns the language
Module["LanguageName"]:ChangeTable("StartHolder", "EndHolder") returns the language
Module["LanguageName"]:ChangeSeparator("Separator") returns the language
Module["LanguageName"]:ChangeConnecter("Connecter") returns the language
Module["LanguageName"]:ChangeVariable("Variable") returns the language
Module["LanguageName"]:AddNewFunction("FunctionName", function() end) returns the language
Module["LanguageName"]["Libraries"]["LibraryName"]:AddNewFunction("FunctionName", function() end) returns the library
Module["LanguageName"]:RunCode([[code]]) returns the language
]]
how to use Language:RunCode
Language:RunCode([[
local VariableName = 0
local TableName = {1, 2, 3}
VariableName = TableName
FunctionName (true, false)
LibraryName.FunctionName ("yes", "no", VariableName)
]])
"local"
can be changed with Language:ChangeVariable
"("..Arguments..")"
can be changed with Language:ChangeHolders
"{"..TableValues.."}"
can be changed with Language:ChangeTable
"."
can be changed with Language:ChangeConnecter
","
can be changed with Language:ChangeSeparator
there is multi line support for functions and tables
example code
local Module = require(7262039707)
local Language = Module:AddNewLanguage("Complex")
local Math = Language:AddNewLibrary("Math")
Language:ChangeHolders("{", "}")
Language:ChangeTable("<", ">")
Language:ChangeSeparator(";")
Language:ChangeConnecter(":")
Language:ChangeVariable("New")
Language:AddNewFunction("PrintLine", print)
Language:AddNewFunction("WarnLine", warn)
Language:AddNewFunction("ErrorLine", error)
Language:AddNewFunction("CheckType", typeof)
Language:AddNewFunction("Sleep", task.wait)
Math:AddNewFunction("RandomInteger", function(Minimum, Maximum)
if typeof(Minimum) ~= "number" then
return error("minimum has to be a number")
end
if typeof(Maximum) ~= "number" then
return error("maximum has to be a number")
end
return Random.new():NextInteger(Minimum, Maximum)
end)
Math:AddNewFunction("RandomNumber", function(Minimum, Maximum)
if typeof(Minimum) ~= "number" then
return error("minimum has to be a number")
end
if typeof(Maximum) ~= "number" then
return error("maximum has to be a number")
end
return Random.new():NextNumber(Minimum, Maximum)
end)
task.wait(5)
Language:RunCode([[
New CheckString = CheckType {"this is a string!"}
New RandomInteger = Math:RandomInteger {1; 3}
New RandomNumber = Math:RandomNumber {1; 3}
New Table = <1; 2; 3; 4; 5>
New Test = (((20 / 2)^(100 - 300) % 5) + 5)
PrintLine {Table; Test}
PrintLine {"test"; CheckString}
WarnLine {"test"; CheckString}
PrintLine {RandomInteger}
WarnLine {RandomNumber}
PrintLine {Sleep {RandomInteger}}
WarnLine {Sleep {RandomNumber}}
ErrorLine {"this is a error message!"; 0}
]])
you can get the module here or you can require it like this
require(7262039707)
if you need any help at all on why your code isn’t working just tell me, also I am always up to fixing up any problems within the module
the code is far from perfect and can obviously be improved as well, so I will need to optimize the code
anyways enjoy the module!