• 0
JerryAtricks

Construction Deletion from Database

Question

Posted (edited)

::: EDITED :::

Narrowed it down to this error:

Spoiler

Error Undefined variable in expression: _data
File exile_server\code\ExileServer_system_territory_database_load.sqf, line 15
Error in expression <stem_database_query_selectSingle;
_id = _data select 0;
_owner = _data select 1;>
19:59:46   Error position: <_data select 0;
_owner = _data select 1;>

This is the line 15 section from that error in ExileServer_system_territory_database_load.sqf:

Spoiler

12 private["_territoryID","_data","_id","_owner","_position","_radius","_level","_flagTexture","_flagStolen","_flagStolenBy","_flagStealMessage","_lastPayed","_buildRights","_moderators","_flagObject"];
13 _territoryID = _this;
14 _data = format ["loadTerritory:%1", _territoryID] call ExileServer_system_database_query_selectSingle;
15 _id = _data select 0;
16 _owner = _data select 1;
17 _name = _data select 2;
18 _position = 
19 [
20  _data select 3,
21   _data select 4,
22  _data select 5
23 ];

Here's the code from ExileServer_system_database_query_selectSingle from line 14:

Spoiler

/**
 * ExileServer_system_database_query_selectSingle
 *
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_parameters","_query","_result"];
_parameters = _this;
_query = [0, ExileServerDatabaseSessionId, _parameters] joinString ":";
_result = call compile ("extDB2" callExtension _query);
switch (_result select 0) do
{
    case 0:
    {
        (format["Database Error: %1", (_result select 1)]) call ExileServer_util_log;
    };
    case 2:
    {
        _result = (_result select 1) call ExileServer_system_database_handleBig;
    };
};
(_result select 1) select 0

I am not sure what the error is exactly. 

This file has the same code in it: https://github.com/maca134/exile-server-package/blob/master/source/server/code/ExileServer_system_territory_database_load.sqf so I'm confused why it would be throwing an error. 

I'm sure one of you more sqf savy coders can spot it in a second. But I am not familiar with sqf editing enough to see it just yet, although I am getting better at it. ;)

 

Any help is much appreciated.

Thanks!

 

 

 

Edited by JerryAtricks

Share this post


Link to post
Share on other sites

3 answers to this question

  • 0

Probably something to do with the error in your config listed at the beginning of your rpt. You're missing a ";" on one of the lines.

 

Share this post


Link to post
Share on other sites
  • 0

Posted (edited)

Nope. I fixed that and it is still happening. 

Edited by JerryAtricks

Share this post


Link to post
Share on other sites
  • 0

I'm not 100% on this because I suck but just something that caught my eye

Line 18 where it says

_position =

That statement is never closed out. I get it the variable is defined somewhere else but I think since its waiting to be defined it still needs a core value, maybe try this:

_position = "";

I honestly don't know if that would help.....just trying to show you something that looked weird to me. Could be perfectly normal.

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.