Jump to content

[Outdated] Unofficial MTA Script Editor 0.3 (4851) RELEASED!


50p

Recommended Posts

I know this a far-fetched idea, but perhaps when this becomes official, it can be integrated into the MTA server and MTA installer itself (when you install MTA, there is a checkbox to install the script editor)

Integration into MTA Server:

Can restart the currently edited resource using a keybind (for local server)

Can do the same for remote server, but ip, port and admin account details needed.

Live syntax checker

lol crazier idea: breakpoints (mta server code is needed to be edited for that)

Most of these ideas are either done or on to-do list.

- When it becomes official, it will be included in the installer as agreed with one of the devs long time ago.

- MTA:SE can start/restart resources with a button - just a single click, if I remember correctly it's bound to F10 key but I don't use it because I use a debug version which has this disabled since I use it in Visual Studio while debugging.

- I have thought of adding some sort of admin panel where you can see chatbox and chat with players, use commands, etc. But that's for the future.

- live syntax checker is already there - the bottom panel of the window shows any Lua errors you made in your script.

- Breakpoints - like you said, it'd require modifying MTA code. I think it'd be possible to do with Lua "coroutines" (google it) but I don't think there is a good enough reason to change your script to use coroutines just for breakpoints (too much to code)

Link to comment

Also, since breakpoints also mean pausing everything going on, this would result in desync and lots of crappy stuff to deal with.

I haven't tested these to see if it is already made but:

support for previously created resources without SE

When you select a script, the grdlist at the right switches to the client/server accordingly.

When you are editing a script, in the row at the top which have quick buttons, there could be a quick toggle between client and server.

Something advanced: add a button called "Optimise" which checks if variables are used in other script files and if it isn't make it a local variable.

Link to comment

Sorry for double post but I opened MTA:SE right now, and pressed File > New Resource and type "deb" in the resource name waited a few seconds to rethink my name and boom crash. I sent the report, but the editor never re-opened :/

  
System.ArgumentException: The path is not of a legal form. 
   at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck) 
   at System.IO.Path.NormalizePath(String path, Boolean fullCheck) 
   at System.IO.Path.GetFullPathInternal(String path) 
   at System.IO.DirectoryInfo..ctor(String path) 
   at Script_Editor.fNewResourceWizard.checkAvailibility_Tick(Object sender, EventArgs e) 
   at System.Windows.Forms.Timer.OnTick(EventArgs e) 
   at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m) 
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) 

edit: occurs whenever i type 3 chars into it

Link to comment

Thanks for the reports. It seems like many users have sent the same report during the last couple of days. It seems like a serious issue.

BTW, you can edit resources which haven't been created with MTA SE. There is a dropdown box where you can select which resource you want to edit. Once you open a file and change the resource, open another file and then switch to the previously opened file, the resource which the file belongs to will be reopened, so you always know which file from which resource you're editing.

Link to comment
no, don't say anything

So either you haven't opened a file from resource or it simply hasn't opened properly. I don't see any other reason. Can you tell me how to reproduce it? What you do step by step.

Link to comment

A GUI designer, similar to Kayls' QT system.

Also, an "Easy Script Designer", in a "flowchart format"

So like there are two rows in the page, client and server seperated by a thin line (red and blue backgrounds)

Then you can Drag and drop "Command handler" from the list to either side. You double click the item to change the command (the edit is selected by default), right click it and press Change variable name (to change it)

You can attach various actions to the object (handler) and do some stuff with it.

If you create a GUI using the GUI designer, you can drag it to the page (client only ofc) and do some basic actions.

It's a very long shot, but whatever, It's not bad that I give ideas, right?

Link to comment

It's not that I have a deadline to meet. It's just live being busier than ever. Working hard (physically), long hours, a lot of overtime, working at the weekends, decorating house, etc. There are other things than just programming/scripting. Life is getting shorter and list of things to program during my life-time is getting longer and longer. Ideas come from nowhere, some of them survive and some of them just die out and don't get to the to-do list. That's all.

Link to comment

Hey 50p, just found a bug, it wont report it so i thought i should post it here, when you launch the client, it crashes and says the following

  
System.ComponentModel.Win32Exception: The system cannot find the file specified 
   at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo) 
   at System.Diagnostics.Process.Start() 
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) 
   at System.Diagnostics.Process.Start(String fileName) 
   at Core.CClient.LaunchMTAClient() 
   at Script_Editor.fMain.startClientToolStripButton_Click(Object sender, EventArgs e) 
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) 
   at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e) 
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) 
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) 
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met) 
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met) 
  

You need to fix your process information before you launch the client, the process info needs +server 127.0.0.1 (or whatever the syntax is) or you could do it the more simpler way and auto associate it so this error wont happen, instead of writing multitheftauto.exe blah blah blah, write Shell(mtasa://127.0.0.1:22003) it will be more efficient. :P gotta luv .NET, and if you have time i need some help with a script in lua (i dunno lua that well, im more of a .NET Programmer)

Link to comment
Hey 50p, just found a bug, it wont report it so i thought i should post it here, when you launch the client, it crashes and says the following

 ....  

You need to fix your process information before you launch the client, the process info needs +server 127.0.0.1 (or whatever the syntax is) or you could do it the more simpler way and auto associate it so this error wont happen, instead of writing multitheftauto.exe blah blah blah, write Shell(mtasa://127.0.0.1:22003) it will be more efficient. :P gotta luv .NET, and if you have time i need some help with a script in lua (i dunno lua that well, im more of a .NET Programmer)

The bug reporter won't work for a bit so thanks for posting here. The problem with what you suggested is that you can't run other versions of the client. I have 4 different versions of MTA installed, using link form (mtasa://) would run the latest one installed which is not what I wanted. I haven't got a clue why it cannot find the files if MTA structure is the same on every machine.. I understand that resources aren't all in the "resources/" folder so I have to pay more attention to it but "MTA Server.exe" is in the same place for everyone unless you moved it to bug MTA:SE. How did you manage to get this crash?

Link to comment

First things first, Im a BIG Fan of you and your great work for this community

Ok, so my MTA Installation is in my "C:\Games\MTA San Andreas\" Folder and I have my MTASE in "C:\Games\MTA San Andreas\MTASE", my crash is not because of the server, but because of the MTA game client, im currently trying to find more bugs to report.. but I think this one is really important to fix, if you dont mind, did you code this in VB.NET or in C#.NET because if its vb.net i could help out :P

EDIT:

Oh yes, the updater is also bugged

the updater says that there is an update and I have the latest version, it downloads an empty archive.

I'm hoping you accept the offer of my help because i was just gonna start coding my own editor when i saw yours ;)

Link to comment
First things first, Im a BIG Fan of you and your great work for this community

Ok, so my MTA Installation is in my "C:\Games\MTA San Andreas\" Folder and I have my MTASE in "C:\Games\MTA San Andreas\MTASE", my crash is not because of the server, but because of the MTA game client, im currently trying to find more bugs to report.. but I think this one is really important to fix, if you dont mind, did you code this in VB.NET or in C#.NET because if its vb.net i could help out :P

EDIT:

Oh yes, the updater is also bugged

the updater says that there is an update and I have the latest version, it downloads an empty archive.

I'm hoping you accept the offer of my help because i was just gonna start coding my own editor when i saw yours ;)

Thanks for the information. Sorry for misleading comment, I meant client but said server (don't ask me how did that happen, was probably too tired). I'll make a note of updater too. VB? I hope you're joking.. Well, VB is for beginners and for people who want to speak with computer (Dim a as Integer? why not simply: int a?)

If you want to help, you could update the functions list (.xml files) or make a simple application to get all the functions from the wiki page and update the files itself.

Link to comment

If you want to help, you could update the functions list (.xml files) or make a simple application to get all the functions from the wiki page and update the files itself.

It should be possible to do that, it's possible within Lua, so yeah.

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...