Results 1 to 10 of 69

Thread: Saving a variable client-side (persistently)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    ... connecting
    Join Date
    Mar 2017
    Location
    Manchester
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    //get your host, user, pass, db, port here
    i set them i removed to post it thats all ..

    bzombies is my database on mysql
    This is the log with developer 1
    Code:
    
    File Handles:
    ----------------------
    81953 files in iwd files
    ------- Game Initialization -------
    gamename: Call of Duty 2
    gamedate: Jun 23 2006
    ----------------------
    Game: G_SetupWeaponDef
    ----------------------
    
    ******* script compile error *******
    uninitialised variable 'bzombies': (file 'maps/mp/gametypes/_mysql.gsc', line 9)
            level.JH_mysql = initMySQL(localhost, chosen, e***, BZombies, 3306);
                                                                 *
    ************************************
    Sys_Error: Error during initialization:
    script compile error
    (see console for details)
    
    > [PLUGIN UNLOADED]
    chosen@ubuntu:~/cod2$
    
    so i added

    Code:
    
    init()
    {
    	host = "lo****ost";
    	user = "c****n";
    	pass = "******";
    	db = "B****bies";
    	port = "3306";
    
        //get your host, user, pass, db, port here
        level.JH_mysql = mysql_reuse_connection();
        if(!isDefined(level.JH_mysql))
            level.JH_mysql = initMySQL(host, user, pass, db, port);
        initAsyncMySQL(host, user, pass, db, port);
    }
    
    and now i get a new error

    i think im making progress

    Code:
    
    ******* script compile error *******
    unknown function: (file 'maps/mp/gametypes/_mysql.gsc', line 109)
                result = mysql_async_getResultAndFree(list[i]);
                         *
    ************************************
    
    Finally its now working with a big thanks to @IzNoGod,

    My problem was not using the correct functions to correspond with the libcod mysql i was using
    so if anyone has the same or similar issue check your functions you can use from you compiled libcod
    Last edited by box3r; 5th August 2017 at 19:15. Reason: Solved.

Posting Permissions

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