Scripts / [SOLVED] Lua Script Error in Max

Author
Message
r2ks
3
Years of Service
User Offline
Joined: 9th Dec 2020
Location:
Posted: 13th Nov 2023 02:49 Edited at: 13th Nov 2023 02:51
when i run this script in GG Max it keeps saying there is an error on line 8 where the Function house1_init(e) is ? any Ideas
--DESCRIPTION: Player Dist

-- LUA Script - Created with LUA Pad 11/12/2023 12:00:39 PM
-- precede every function and global member with lowercase name of script + _main

--Main House Script

Function house1_init(e)
end

Function house1_main(e)
Playerdist = getplayerdistance(e)
if playerdist < 100 Then
Prompt(" You have Arrived")
end
end

The author of this post has marked a post as an answer.

Go to answer
PM
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 13th Nov 2023 19:56
This post has been marked by the post author as the answer.
LUA is case-sensitive so, rather than:

Function house1_init(e)
end

it should be:

function house1_init(e)
end
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM

Login to post a reply

Server time is: 2024-11-21 11:25:12
Your offset time is: 2024-11-21 11:25:12