What's new

Garry's Mod Lua Help

  • Thread starter AltoSaxBLABLA
  • Start date
  • Views 475
Status
Not open for further replies.
AltoSaxBLABLA

AltoSaxBLABLA

Lurking Member ⊙▂⊙
Messages
342
Reaction score
54
I've recently got into learning Garry's Mod Lua. and midst making a very simple gamemode. Ive run into a problem. Im trying to make players go onto a random team on PlayerInitialSpawm, and in the same area send a message when the player joins. None of this works:
TsJaRqQ.png

The error I get is :
ZK0arjO.png

Can you help? I'm stumped.
 
AltoSaxBLABLA

AltoSaxBLABLA

Lurking Member ⊙▂⊙
Messages
342
Reaction score
54
http://wiki.garrysmod.com/page/Player/PrintMessage
It's rather obvious. You closed the function before finishing it.
Code:
ply:PrintMessage( HUD_PRINTTALK, "Welcome to Speed Run, " .. ply:name() .. "!" )
When ever i do that, i get the error:
Code:
[ERROR] gamemodes/speed run/gamemode/init.lua:42: '<eof>' expected near 'end'
  1. unknown - gamemodes/speed run/gamemode/init.lua:0
 
Z61

Z61

Some times our saints are sinners
Retired
Programmer Forum Addict Odysseus' Summit
Messages
5,476
Reaction score
3,422
When ever i do that, i get the error:
Code:
[ERROR] gamemodes/speed run/gamemode/init.lua:42: '<eof>' expected near 'end'
  1. unknown - gamemodes/speed run/gamemode/init.lua:0
Why do you have two end statements?
 
Status
Not open for further replies.
Top Bottom