1. This forum is ARCHIVED! Visit the new Cloud Sixteen forums, codename Eden, at https://eden.cloudsixteen.com. These forums will remain archived for a few months before being closed down, so try to encourage plugin developers to begin moving their content across to the new forums.
Dismiss Notice
Hi Guest, you need a Steam account to register and post on these forums. Login with Steam at the top of the forums to get started!
Dismiss Notice
Hi Guest, do you want to buy HL2RP or another Clockwork schema? Visit the Cloud Sixteen Store to get started!

Clockwork SharedVars Syntax

Discussion in 'Development' started by Dremek, May 22, 2014.

  1. What's the syntax/usage of Clockwork's shared variables?

    ClockworkAddSharedVars

    I have a entity which calls upon two variables (it's actually ported from a different framework, and it's using NetVars), Title And Text:
    Code:
    		local text = self:GetNetVar("text", "This Noti-Board is not assigned yet.")
    		local title = self:GetNetVar("title", "A Noti-Board")
    
    And the command, which sets the NetVars:

    Code:
    				v:SetNetVar("text", text)
    				v:SetNetVar("title", title)
    
    Could anyone share with me how to properly use the hook; ClockworkAddSharedVars (to properly create one), and the library; sharedvars (to call upon it and edit it.)

    Thanks!

    (If anyone is curious I'm porting Noti-Boards.)
     
  2. kurozael

    kurozael Cloud Sixteen Director Staff Member Administrator Investor

    Should just be able to replace Set/GetNetVar with Set/GetSharedVar.
     
  3. Thank you kurozael!

    I'll test it out!


    Doesn't work, I get the error (nil value).

    :L

    [​IMG]

    Any ideas?
     
  4. Are you allowed to port noti-boards?

    https://github.com/author of a different framework/NSPlugins/blob/master/Note%20From%20Black%20Tea(rebel1324).txt
     
  5. kurozael

    kurozael Cloud Sixteen Director Staff Member Administrator Investor

    Ha ha. What a bunch of hypocrites they are, why not do what they did, and just copy and paste the code and then modify it slightly by changing a few variable names and alter the coding style.
     
  6. You're stealing my innovation lol
     
  7. TestUser

    TestUser Guest

    You can just stop whining, Carl. :)
     
  8. :'(
     
  9. Implying I was before?
     
  10. Lugaru

    Lugaru Guest

    Who the fuck even are you?
    I'm sorry for the off topic post but good god.

    Also, contact the original author of the noti-board plugin.
     
  11. I will contact him when I resume development (actually sitting down and attempting to code) on the 14th.

    Thing is, noti-boards aside, SharedVars still would be helpfully in a lot of ways.

    I also probably know who Carl is on steam, but I'd rather not say.
     

Previous Readers (Total: 0)