Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ Compiling the server ➜ dofile 'luac.out' fails

dofile 'luac.out' fails

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Glorimus   (7 posts)  Bio
Date Mon 17 Oct 2016 08:43 AM (UTC)
Message
in mushclient --


/Debug("summary")

MUSHclient version: 4.94
Compiled: Jul 28 2014.
Time now: Monday, October 17, 2016, 1:28 AM
Client running for:  2d 02h 52m 23s
World opened for:    1d 02h 37m 21s
Operating system: Windows XP
Libraries: Lua 5.1.4, PCRE 8.35, PNG 1.5.14, SQLite3 3.8.4.3, Zlib 1.2.8


on mymachine

>more test.lua
Note("HI IM LUA")
>luac -v
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
> luac test.lua
> luac -l luac.out
main <test.lua:0,0> (4 instructions, 16 bytes at 0x7fef98404230)
0+ params, 2 slots, 0 upvalues, 0 locals, 2 constants, 0 functions
	1	[1]	GETGLOBAL	0 -1	; Note
	2	[1]	LOADK    	1 -2	; "HI IM LUA"
	3	[1]	CALL     	0 2 1
	4	[1]	RETURN   	0 1


set lua script to luac.out

Immediate execution
Script file: bad header in precompiled chunk


>more test2.lua
dofile 'luac.out'


Immediate execution
c:/test/luac.out: bad header in precompiled chunk
stack traceback:
[C]: in function 'dofile'
[string "Script file"]:45: in main chunk


is there anyway i can get the mushclient to load my compiled script?
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Wed 19 Oct 2016 02:11 AM (UTC)
Message
When I tested that I got a different version of luac than you, available from:

http://www.gammon.com.au/files/mushclient/lua5.1_extras/luac5.1.zip


C:\Program Files\MUSHclient\temp>luac5.1.exe -v
Lua 5.1.3  Copyright (C) 1994-2008 Lua.org, PUC-Rio



When I tested with the output of that, it worked OK in MUSHclient.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


12,181 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.