sripts.lua how to load them?


(ReasonableDoubt) #1

Hi guys been having a bit of trouble with loading .lua scripts for server protection etc… On our servers. We have a Jaymod 2.2.0 and an ETpub 0.9.1 server. I have been reading a fair bit over the last couple of days and learning more and more but when I go to the server and bring down the console and type

/lua_status

It says “no lua scripts loaded”

I’m currently stuck at the moment with this. I’m not sure if the Jaymod and the ETpub can use the same scripts but this is what I have in the server configs…

set lua_models “fakeplimit.lua guidcheck.lua userinfocheck.lua wsfix.lua”
set lua_allowedmodules “fakeplimit.lua guidcheck.lua userinfocheck.lua wsfix.lua”

I did a couple of server restarts but still nothing. I’m sure that the answer is noob but this is driving me crazy. lol

Any help would be good.

Cheers.

P.S. If there is another topic with answers could someone please redirect me to it. I looked for a while and found nothing or I just missed it??


(acQu) #2

set lua_models “fakeplimit.lua guidcheck.lua userinfocheck.lua wsfix.lua”

set it to

set lua_modules “fakeplimit.lua guidcheck.lua userinfocheck.lua wsfix.lua”

This is a hello world lua taken from WolfWiki (bit modified though :)):

function et_InitGame(levelTime,randomSeed,restart) – called at beginning of a gameround
et.G_Print("Hello Girls!!!
") – printout our text to the console
end --close et_InitGame()

Take it, place it in etpro, or jaymod (not sure where to place in jaymod though), and load up your server with cvar lua_modules set, and see if it prints the text to server console.

Best to start small with a hello world :slight_smile: If that works, then others probably work too. But there could be some nasty compatibility problems between mods, as i think, that not all have the exact same implementation of lua. Would be interesting to know this. Unfortunately etpro is not open source. If so, we could all just look at the source of etpro and make one ET wide lua standard (my dream!!!) (as etpro probably has best implementation).


(gaoesa) #3

For the ETPub, set the lua_allowedmodules string to empty. That should have the sha1 signatures of the modules you allow. But those are not needed at all, the mod will load all the modules set in the lua_modules if the lua_allowedmodules is empty. Jaymod does not support Lua at all.


(BigBear) #4

& To work : check if no error in the .lua in your log file (checked “at each server start - restart”)

Take care some .lua script can encounter compatibility problems on some MODs including on some ETPub’s Based MOD : there are some differences.
Example for Checking Player’s Levels… But on the other sides all based ETPub’s MODs are compatible near 99%… but that is the last 1% that can cause problem in a part of a script :slight_smile:


(jemstar) #5

Also check your server’s screenlog.o, at the initialization of each map it will show the lua api and if the scripts load correctly:

Setting MOTD…
Lua API: Loading noq/noq.lua
Loading NOQ config from /usr/local/games/et/*******/8.2.121.145:27960/nq/noq/
Lua API: Loading dynamite_counter.lua
Lua API: Loading tagprotection.lua
Lua API: Loading advancedvoting.lua
Lua API: Loading nextmap.lua
Lua API: Loading connect.lua
Lua API: Loading rspree.lua
Lua API: Loading kspree.lua
Lua API: Loading Autosetlevel.lua

If a .lua does not load it will show any script errors there, it will state the script name and line where error is as well as what it expects i.e.:

Lua API: Error Loading connect.lua near line 54 expect ‘end’ near return true at <EOF> (end of fuction)

I made that up all mine load correct atm…but that is something like you will see.