ynpMOOSE 122 Report post Posted February 28, 2016 (edited) I've added a class to my mission PBO, adding a menu option to the Office Trader. The menu option does appear in-game and the custom SQF is successfully called (verified with hint messages). class OfficeTrader { targetType = 2; target = "Exile_Trader_Office"; class Actions { class CreateChangeWebPIN: ExileAbstractAction { title = "Create/Change Web Integration PIN"; condition = "true"; action = "_this call webPINIntegration"; }; }; }; The custom SQF is in the mission PBO and is compiled in the init.SQF: webPINIntegration = Compile PreprocessFile ("custom\webPinIntegration.sqf"); I've added custom SQL to the Exile.ini, created a table in the Exile db and tested the SQL command syntax in MySQL Workbench. [createAccountWebPIN] SQL1_1 = INSERT INTO web_pin SET web_pin = ?, account_uid = ? Number Of Inputs = 2 SQL1_INPUTS = 1,2 However, when I try to call the SQL from my custom SQL, nothing happens. I tried the debug version of extdb2.dll and it doesn't log anything about this SQL attempt. Again, I verified with hints that the playerUid and webPin are generating proper values. private ["_playerUid","_webPIN"]; //Get PlayerUID _playerUid = getPlayerUID player; //Generate random 6-digit PIN number\ _webPIN = floor(random 900000) + 100000; format ["createAccountWebPIN:%1:%2", _webPIN, _playerUid] call ExileServer_system_database_query_insertSingle; @Torndeco , or anyone else, have any ideas why this isn't executing? Thanks, Moose Edited February 28, 2016 by ynpMOOSE Share this post Link to post Share on other sites
Torndeco 233 Report post Posted February 28, 2016 If you are using the debug version of extDB2, you will see log entries for every callExtension. So that means format ["createAccountWebPIN:%1:%2", _webPIN, _playerUid] call ExileServer_system_database_query_insertSingle; Is never ran on the server So you screwed up your sqf code somewhere, you really should be adding diag_log statements (not hints) & verifying the code is actually ran on the server. Share this post Link to post Share on other sites
ynpMOOSE 122 Report post Posted February 28, 2016 (edited) OK, I'm still learning. Thanks for the diag_log tip @Torndeco. I can now see using diag_log that the variables are both set correctly, but see these errors below in the server log. My guess is that I'm executing client side, but need to execute server side. Trying to figure out how to do this, but it's not coming to me easily. 14:42:38 Error in expression <ebPIN:%1:%2", _webPIN, _playerUid] call ExileServer_system_database_query_insert> 14:42:38 Error position: <ExileServer_system_database_query_insert> 14:42:38 Error Undefined variable in expression: exileserver_system_database_query_insertsingle Edited February 29, 2016 by ynpMOOSE Share this post Link to post Share on other sites
yellow|avdieking 40 Report post Posted March 1, 2016 you can't execute it from a client it has to be server side Share this post Link to post Share on other sites
ynpMOOSE 122 Report post Posted March 1, 2016 5 hours ago, yellow|avdieking said: you can't execute it from a client it has to be server side Yup, this was definitely the problem. I've got it working now. Sending to server via ExileClient_system_network_send and a modified ExileServer_system_network_dispatchIncomingMessage. Share this post Link to post Share on other sites