{SHU}ALEXM16

Script Question, ranking

19 posts in this topic

38 minutes ago, Metalman10 said:

that should give him a bit of a hint that i dont know anything about what hes trying to do.

So say "I don't know" instead. You forget, English isn't a first language for everyone and some forum users may not understand the tongue in cheek use of "looks good to me".

  • Like 2

Share this post


Link to post
Share on other sites
2 hours ago, Metalman10 said:

im not responsible on how the user takes my message. He has google translate im sure

"Your script is fucked" is easier to interpret in any language then what you wrote.

Edited by John
  • Like 6

Share this post


Link to post
Share on other sites
Advertisement
11 hours ago, WolfkillArcadia said:

"getPlayerUID" requires a object to get the uid from, however, since you are running this on the server, "player" cannot be used. You will need to either get the UID passed into this script, make use of Exile's network messages and get the player object from the sessionID, or do the arma way and pass this script the netID of the player so you can convert it into an object. 


Your extDB call needs to be formatted so extDB can understand it. Using what your call requires, it would be:


format["getRank:%1",_playerUID] call ExileServer_system_database_query_selectSingleField;

 

OK, Had the time to read, re read and everything not too sound too stupid :-p. Your explanation is more then clear. Now I want to be sure I understand :-)

I understand I cannot make DB calls from client side, so server side.

The thing I did not understand: 

"getPlayerUID" requires a object to get the uid from, however, since you are running this on the server, "player" cannot be used. You will need to either get the UID passed into this script, make use of Exile's network messages and get the player object from the sessionID, or do the arma way and pass this script the netID of the player so you can convert it into an object. 

From what I understand nicely explained to me, and from looking into different mods to get a clear picture(exad Virtual Garage(he uses the db etc)) Here is my new try. :-)

Client side (rank.sqf/ran by init.sqf)

private["_playerUID","_rank"];


if (_rank isEqualTo "1") then 
{
	[] execVM "rank\spawnr1.sqf";
};

if (_rank isEqualTo "2") then 
{
	[] execVM "rank\spawnr2.sqf";
};


Server side (player UID already a variable in database_load)
ExileServer_object_player_database_load:

_rank = format["getRank:%1",_playerUID] call ExileServer_system_database_query_selectSingleField;

Let me know if I got it right. I am so happy starting to understand this :-) you guys are awesome. Thanks a million

  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, Metalman10 said:

im not responsible on how the user takes my message. He has google translate im sure

You really are a tool, aren't you..

  • Like 4

Share this post


Link to post
Share on other sites
8 hours ago, Metalman10 said:

im not responsible on how the user takes my message. He has google translate im sure

Did you really just say that? Do you know what google translates "looks good to me" into?.... you guessed it: "looks good to me"

  • Like 4

Share this post


Link to post
Share on other sites
1 minute ago, Mezo said:

Did you really just say that? Do you know what google translates "looks good to me" into?.... you guessed it: "looks good to me"

He must be referring to the new translator that works out what you didn't actually mean.

  • Like 1

Share this post


Link to post
Share on other sites
3 minutes ago, kuplion said:

He must be referring to the new translator that works out what you didn't actually mean.

people....

  • Like 2

Share this post


Link to post
Share on other sites
5 hours ago, {SHU}ALEXM16 said:

OK, Had the time to read, re read and everything not too sound too stupid :-p. Your explanation is more then clear. Now I want to be sure I understand :-)

I understand I cannot make DB calls from client side, so server side.

The thing I did not understand: 

"getPlayerUID" requires a object to get the uid from, however, since you are running this on the server, "player" cannot be used. You will need to either get the UID passed into this script, make use of Exile's network messages and get the player object from the sessionID, or do the arma way and pass this script the netID of the player so you can convert it into an object. 

From what I understand nicely explained to me, and from looking into different mods to get a clear picture(exad Virtual Garage(he uses the db etc)) Here is my new try. :-)


Client side (rank.sqf/ran by init.sqf)

private["_playerUID","_rank"];


if (_rank isEqualTo "1") then 
{
	[] execVM "rank\spawnr1.sqf";
};

if (_rank isEqualTo "2") then 
{
	[] execVM "rank\spawnr2.sqf";
};


Server side (player UID already a variable in database_load)
ExileServer_object_player_database_load:

_rank = format["getRank:%1",_playerUID] call ExileServer_system_database_query_selectSingleField;

Let me know if I got it right. I am so happy starting to understand this :-) you guys are awesome. Thanks a million

providing the variable _playerUID is defined as the calling players UID. Then you're right on the money :) 

Share this post


Link to post
Share on other sites
4 minutes ago, Metalman10 said:

lmao

What were you taking in order to see that as a viable response?... I need some. Even if it does just give you access to a better version of google translate.

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

  • Recently Browsing   0 members

    No registered users viewing this page.