• '=' expected near 'GM'?
    4 replies, posted
I have been trying my hand at creating my first gamemode, but I stumbled onto a problem nobody else seems to have when I searched for it. I've created a lua script to have the player spawn with a specific loadout and stats, but the error '=' expected near 'GM' keeps showing up, and the player spawns with nothing. Here is my lua.init file. AddCSLuaFile("cl_init.lua") AddCSLuaFile("shared.lua") include("shared.lua") fucnction GM:PlayerSpawn(ply)     ply:SetGravity(.80)     ply:SetMaxHealth(100)     ply:SetRunSpeed(500)     ply:SetWalkSpeed(350)     ply:give("weapon_gravitygun")     ply:give("weapon_physgun") end I've done it step by step by a youtube tutorial, but no-one in the comments seemed to have my issue. I use Atom for my lua script writing. I'll be happy to provide any more information needed.
fucnction fucnction fucnction fucnction fucnction FUCNCTION
Also, it should be ply:Give, functions are case-sensitive.
... I am... so ashamed of myself... Thank you for pointing out my ridiculous mistake my friends. I swear, I waited 2 weeks for a reply from the tutorial man, just to go here and have this tiny little thing pointed out to me in 15 minutes. So, again, thank you XD.
you didnt spot a typo in 2 weeks? Thats...wow..
Sorry, you need to Log In to post a reply to this thread.