Jump to content

[lua][/lua] highlighting


Recommended Posts

Just guessing, why lua syntax highlighting isn't working?

See how it worked here,

viewtopic.php?f=91&t=25072#p294527

now here is the quote of the same post,

Clientside:

bindKey("p", "down", "chatbox", "Admin") -- Admin is chatinput begin. 

Serverside:

function adminCommand(player, command, ...) 
        -- Add a check if he is a admin.. 
    outputChatBox("Admin chat: "..getPlayerName(player)..": "..table.concat({...}," "), getRootElement(), 255, 0, 0, true) 
end 
addCommandHandler("Admin", adminCommand) 

or it only works for devs o.O?

Edited by Guest
Link to comment
  • 4 weeks later...
  • 1 month later...
  • 4 months later...

I'll fix it tomorrow or this evening, if I remember. We really need to update the function list - someone was going to write a script to pull them out of the code... You could even do that in Lua...

Link to comment
I'll fix it tomorrow or this evening, if I remember. We really need to update the function list - someone was going to write a script to pull them out of the code... You could even do that in Lua...

I made this script 1-2 moths ago. Named `getGlobalsList`. Link - https://community.multitheftauto.com/index.php?p=resources&s=details&id=2174. I'm using it to generate grouped lists of all MTASA functions for my own syntax highlighter in some editor.

Link to comment
Well, if you can modify it to generate something like the PHP script linked below, then it'd be great :)

http://pastebin.com/D1Qv77NN

Fixed setPlayerTeam.

I made special resource named `geshiLuaHLGenerator`, which generates lua_{TIMESTAMP}.php files into own folder after server chat command `/generateGeshiLuaHL`. I think it works on any version from 1.0.4 to latest 1.1. Resource uses template file to generate output files. Latest lua_{TIMESTAMP}.php you can find in resource folder.

You can download this resource from here - http://multi-theft-auto.ru/geshiLuaHLGenerator.zip. Template file has some new things like links to lua.org docs for standart lua functions. Order of keyword lists also was changed.

Anyway, new generated HL file must be checked for possible errors. Tell me if you will find something wrong.

Edited by Guest
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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