SO I'm trying to make it then when a player reloads any weapon, they shout "Reloading!" in the chat box. All the weapons use the base, base_weapons, so in sh_base_weapons.lua, I put
[code]
function ITEM:Reload()
if (client:GetPos():Distance( LocalPlayer():GetPos() ) <= 256) then
chat.AddText(Color(255, 250, 150), client:Name().." yells: Reloading ");
return true;
end;
end
[/code]
but it doesn't work. gives the error:
[ERROR] gamemodes/pistachio/gamemode/main/items/base/sh_base_weapon.lua:20: unexpected symbol near ','
1. unknown - gamemodes/pistachio/gamemode/main/items/base/sh_base_weapon.lua:0
Any idea what I'm doing wrong here?
I'm pretty sure you don't need those semicolons in the code.
[QUOTE=Jellyman;40853249]I'm pretty sure you don't need those semicolons in the code.[/QUOTE]
Are semicolons even required for anything? ,_,
They're carryovers from C++, if I'm not mistaken lua just ignores them
yeah, i did C++ before learning lua and i kinda put them in there by habit. lua looks at them as whitespace though. doesn't affect anything. So no one has any idea then what's causing this?
Sorry, you need to Log In to post a reply to this thread.