Results 1 to 10 of 69

Thread: Saving a variable client-side (persistently)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Private
    Join Date
    Apr 2020
    Posts
    66
    Thanks
    28
    Thanked 14 Times in 13 Posts
    I managed to retrieve the stats from the database using this function.
    Code:
    loadstats()
    {
        result =  [[level.mysql_wrapper]]("SELECT * FROM player_information WHERE login = '" + self.izno["login"] + "'", true);
    
    		if(isdefined(result))
    		{
    			row = mysql_fetch_row(result);
    			if(isdefined(row) )
    			{
    
    				for(i=0;i<level.stats.size;i++)
    				{
    					self.stats[level.stats[i]] = int(row[i+4]);
    				}
    			}
    			mysql_free_result(result);
    		}
    	self checkrank();
        self thread counter();
        self thread checkban();
    }
    Last edited by agribilos; 27th May 2020 at 20:34.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •