[Home] [Downloads] [Search] [Help/forum]

Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  Compiling the server
. . -> [Subject]  dofile 'luac.out' fails

dofile 'luac.out' fails

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

Posted by Glorimus   (7 posts)  [Biography] bio
Date Mon 17 Oct 2016 08:43 AM (UTC)
in mushclient --


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, 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?
[Go to top] top

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


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
[Go to top] 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.


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

Go to topic:           Search the forum

[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]