• Making a moneyprinter [Support]
    4 replies, posted
Hello, I've started making my own money printer (Entity) and whilst doing this I'm getting an error in cl_init.lua [CODE] [ERROR] addons/darkrpmodification/lua/entities/something_moneyprinter/cl_init.lu a:10: attempt to call global 'IsValidEntity' (a nil value) 1. unknown - addons/darkrpmodification/lua/entities/something_moneyprinter/cl_ init.lua:10 [/CODE] And line 10 in cl_init.lua [CODE] owner = IsValid( owner ) and owner:Nick()) or "unknown" [/CODE] Any help please?
are you sure you have owner defined properly?
-> Posts only part of code -> Expects others to help him out Just most whole code.
[QUOTE=Chickengbs;46130016] [CODE] owner = IsValid( owner ) and owner:Nick()) or "unknown" [/CODE] [/QUOTE] There's an extra ) in there. Read your code more thoroughly.
Ternary Operations are nice, but controlling your ( )s is important: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/logic/ternary_operations.lua.html[/url] Also, it looks like you corrected the IsValidEntity by using IsValid in the example.
Sorry, you need to Log In to post a reply to this thread.