Sign in to follow this  
Static-X

[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

Share this post


Link to post

That was posted when syntax highlighting still worked, and it seems it kept all the formatting.

Share this post


Link to post
That is the point, I want to know why it isn't working.

Actually, so do I, been doing some looking around and i do not see why it is not working.bbgeshi is installed as it should be.

Share this post


Link to post

I worked out why it's not working, but I'm on holiday now. I'll fix it when I get back in a few days.

Share this post


Link to post

would be also nice to have "Lua" BBCode button like we have "Code" button :3

Share this post


Link to post

yup, much easier, and newbies doesnt know about lua tags or code=lua at all. even i didnt know it when i registered (but i've edited my post and saw its working :P)

Share this post


Link to post
--- test with [lua] 
addCommandHandler("cmd",function(player) 
outputChatBox(" ",player) 
end ) 

P/S: Both works for me..

--- test with [code=lua] 
addCommandHandler("cmd",function(player) 
outputChatBox(" ",player) 
end ) 

Share this post


Link to post

Humm weird, nevermind then.

One of Varez' post contained [lua] tags and wasn't correctly highlighted.

Share this post


Link to post

getPlayerTeam is somewhat buggy:

code=lua:

  
getPlayerTeam" class="kw2">getPlayerTeam(player) 
  

code=text:

  
getPlayerTeam(player) 
  

Share this post


Link to post

Could someone fix this please? getPedClothes is bugged as well

getPedClothes() 

getPedClothes" class="kw2">getPedClothes() 

Share this post


Link to post

Also really long code doesn't show up when used with lua tags (or anything else other than 'text').

Share this post


Link to post

yup, getPlayerTeam is buggy. I told it to everyone many times at Scripting Forum -.-

Share this post


Link to post

setPlayerTeam still is bugged.

plain text

setPlayerTeam ( player, Army ) 

lua

setPlayerTeam ( player, Army ) 
  

And when this bug will be fixed?

Share this post


Link to post

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...

Share this post


Link to post
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 - http://community.mtasa.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.

Share this post


Link to post

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.

Share this post


Link to post
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

Share this post


Link to post

Can you also add a [lua] /

 BB codes buttons to post form near [ Code ] button? It's very actual feature.

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.