View previous topic :: View next topic |
Author |
Message |
Dr.Disrespect Grandmaster Cheater Reputation: 3
Joined: 17 Feb 2016 Posts: 526
|
Posted: Tue Mar 07, 2017 12:23 pm Post subject: A small suggestion for Lua Script window in CE. :) |
|
|
I have been writing lua code in CE for several days, and I have a small, or maybe naive, suggestion: I think it would be nice for the Lua Script window to have a tab control, which does something like this:
In the first tab, we can declare every global variables, functions. The stuff in this tab compiles before the second tab.
Then in the second tab, we write our code.
As a result, we can write code more efficiently and have easier maintenance as well. Just like we can create a class in a separate tab in Visual Studio.
I don't know if it's doable and easy to implement. If not, please ignore this post.
_________________
**************
A simple example is better then ten links. |
|
Back to top |
|
|
pellik Advanced Cheater Reputation: 0
Joined: 14 Jun 2013 Posts: 93
|
Posted: Tue Mar 07, 2017 5:23 pm Post subject: |
|
|
Shit I'd just be happy with a kill button.
|
|
Back to top |
|
|
usernotfound Expert Cheater Reputation: 0
Joined: 21 Feb 2016 Posts: 115
|
Posted: Tue Mar 07, 2017 8:06 pm Post subject: |
|
|
Maybe not quite what you are looking for, but what I like to do is create separate memory records, start each one off with a {$lua} and then that way I contain all my hacks/global vars/gui logic/etc. in their respective records (pressing 'OK' executes it like Lua table does). I use the main lua script table then to activate those records when the trainer is loaded
Code: | getMemoryRecordByDescription('Hacks').Active = true
getMemoryRecordByDescription('Addresses').Active = true
-- etc.. |
You can also just save your separate Lua scripts as .lua file and use require 'yourscriptname' to run that script outside of the CE table (like including libraries in VS)
|
|
Back to top |
|
|
akumakuja28 Master Cheater Reputation: 16
Joined: 28 Jun 2015 Posts: 432
|
Posted: Tue Mar 07, 2017 8:36 pm Post subject: Re: A small suggestion for Lua Script window in CE. :) |
|
|
fmanager wrote: | I have been writing lua code in CE for several days, and I have a small, or maybe naive, suggestion: I think it would be nice for the Lua Script window to have a tab control, which does something like this:
In the first tab, we can declare every global variables, functions. The stuff in this tab compiles before the second tab.
Then in the second tab, we write our code.
As a result, we can write code more efficiently and have easier maintenance as well. Just like we can create a class in a separate tab in Visual Studio.
I don't know if it's doable and easy to implement. If not, please ignore this post. |
I looked into this awhile back its possible with multiple memo classes.
the memo class is not the mscript class so you get syntax highlighting or such
_________________
|
|
Back to top |
|
|
Dr.Disrespect Grandmaster Cheater Reputation: 3
Joined: 17 Feb 2016 Posts: 526
|
Posted: Tue Mar 07, 2017 9:29 pm Post subject: Re: A small suggestion for Lua Script window in CE. :) |
|
|
akumakuja28 wrote: | fmanager wrote: | I have been writing lua code in CE for several days, and I have a small, or maybe naive, suggestion: I think it would be nice for the Lua Script window to have a tab control, which does something like this:
In the first tab, we can declare every global variables, functions. The stuff in this tab compiles before the second tab.
Then in the second tab, we write our code.
As a result, we can write code more efficiently and have easier maintenance as well. Just like we can create a class in a separate tab in Visual Studio.
I don't know if it's doable and easy to implement. If not, please ignore this post. |
I looked into this awhile back its possible with multiple memo classes.
the memo class is not the mscript class so you get syntax highlighting or such |
Can you illustrate more about memo class? I don't quite get the idea.
@usernotfound
Thanks for the reply. I have been using your first solution too, as for the second one, I'm not sure. Because I kinda do not want the user to modify the lua file, which may cause the trainer to crash.
_________________
**************
A simple example is better then ten links. |
|
Back to top |
|
|
akumakuja28 Master Cheater Reputation: 16
Joined: 28 Jun 2015 Posts: 432
|
Posted: Wed Mar 08, 2017 4:22 am Post subject: |
|
|
check your mailbox
_________________
|
|
Back to top |
|
|
Dr.Disrespect Grandmaster Cheater Reputation: 3
Joined: 17 Feb 2016 Posts: 526
|
Posted: Wed Mar 08, 2017 10:40 am Post subject: |
|
|
akumakuja28 wrote: | check your mailbox |
Thank you, +rep.
_________________
**************
A simple example is better then ten links. |
|
Back to top |
|
|
|