Sign in to follow this  
FireStorm

How interact with exile DataBase

36 posts in this topic

37 minutes ago, WURSTKETTE said:

Can you post the part in your script where you 


call ExileClient_system_network_send;

You sending not the allowed ammount of parms to server.

I put exactly what you send to me: 

_ProfileName = profileName; // name player;
_UidPlayer = getPlayerUID player;

["createAccount", [_ProfileName,_UidPlayer]] call ExileClient_system_network_send;

 

Share this post


Link to post
Share on other sites

I've made some progress in solving my problem. Here's what I did:

Spoiler

I created a "CfgNetworkMessages.hpp" file in the exile.malden folder. And I put this in it:


class CfgNetworkMessages
{
	class createQuestAccount
	{
		module = "quest_createaccount";
		parameters[]=
		{
			"STRING",
			"STRING"
		};
	};
};

I later added this to the "description.ext" file:

#include "CfgNetworkMessages.hpp"

Then I created the file: "ExileServer_quest_createaccount_network_createQuestAccount.sqf" with inside:


private["_ProfileName", "_UidPlayer"];

_name = _this select 0;
_id = _this select 1;

format ["createAccountQuests:%1:%2",_id, _name] call ExileServer_system_database_query_fireAndForget;

Finally to finish with the addition in the file "exile.ini" of this:


[createAccountQuests]
SQL1_1 = INSERT INTO quests SET account_uid = ?, name = ?
Number Of Inputs = 2
SQL1_INPUTS = 1,2

 

Now when I execute the trigger that contains that code: 

_ProfileName = profileName; 
_UidPlayer = getPlayerUID player;

["createQuestAccount", [_ProfileName,_UidPlayer]] call ExileClient_system_network_send;

I have two entries in my database, that's what it looks like:

Capture.PNG

Share this post


Link to post
Share on other sites
Advertisement

I add the part of the corresponding rpt file:

"ExileServer - Starting session for 'FireStorm' with ID 'ovezkzso'..."
"ExileServer - Dispatching hasPlayerRequest for session 'ovezkzso'..."
Error in expression <] call BIS_fnc_param;
_publicMessage = [ExileClientSessionId, _messageName, _mes>
  Error position: <ExileClientSessionId, _messageName, _mes>
  Error Undefined variable in expression: exileclientsessionid
File exile_client\code\ExileClient_system_network_send.sqf, line 15
Error in expression <] call BIS_fnc_param;
_publicMessage = [ExileClientSessionId, _messageName, _mes>
  Error position: <ExileClientSessionId, _messageName, _mes>
  Error Undefined variable in expression: exileclientsessionid
File exile_client\code\ExileClient_system_network_send.sqf, line 15

 

Share this post


Link to post
Share on other sites

Ah sorry pal, totally forgot about network in filename and that your sending to server :> (sessionid will be always attached b4 package)

In your ExileServer_quest_createaccount_network_createQuestAccount.sqf:

 

private["_ProfileName", "_UidPlayer"];

_paket = _this select 1;
_name = _paket select 0;
_id = _paket select 1;

format ["createAccountQuests:%1:%2",_id, _name] call ExileServer_system_database_query_fireAndForget;

 

Edited by WURSTKETTE

Share this post


Link to post
Share on other sites

It works !

The only small defect is that in addition to entering the UID and name it enters another line (before) like this: Capture.PNG

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.