Jump to content

[lua][/lua] highlighting


Recommended Posts

Posted (edited)

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
Admin.png
  • MTA Team
Posted
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.

Posted

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.

Posted

oh rly?

thats awesome!

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

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)

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted
--- 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 ) 
Admin.png
  • 4 weeks later...
Posted

getPlayerTeam is somewhat buggy:

code=lua:

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

code=text:

  
getPlayerTeam(player) 
  

?

  • 1 month later...
  • 4 months later...
Posted

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

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

Posted (edited)
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

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