Blockland Forums > Modification Help
export($string???
(1/2) > >>
tyler0:
I'm trying to export a string and it won't work for some reason? Is it possible to?

--- Code: ---    $Player = %client.BL_ID TAB %client.cash TAB %client.ed;
    export($Player, $logFile, false);
--- End code ---
Nexus:
exporting is used for arrays usually
$player::one = "blarg";
$player::two = "dooble";
$player::three = "simon";

export("$player::*", path);

edit: lol you should just make one megathread for all your coding help topics.  I think you have like 30.
tyler0:

--- Quote from: Nexus on June 12, 2011, 01:19:46 PM ---exporting is used for arrays usually
$player::one = "blarg";
$player::two = "dooble";
$player::three = "simon";

export("$player::*", path);

edit: lol you should just make one megathread for all your coding help topics.  I think you have like 30.

--- End quote ---

Why does it do this?

My script:


--- Code: ---$Player::ID = %client.BL_ID;
$Player::Cash = %client.cash;
$Player::Education = %client.ed;
export("$player::*", $logFile, false);

--- End code ---

It saves...


--- Code: ---$Player::Cash = "0";
$Player::Education = "1";
$Player::ID = "999999";
$Player::maxPredictionTicks = "30";
$Player::maxWarpTicks = "30";
$Player::minWarpTicks = "0.5";

--- End code ---

maxPredictionTicks? maxWarpTicks? minWarpTicks? << Whats that? Lol
tyler0:
nvm i just changed it to $PlayerData. But I need all the data on one line... So i can set it up to load the data.


--- Code: ---$Playerdata::Cash999999 = "0";
$Playerdata::Education999999 = "1";
$Playerdata::ID999999 = "999999";

--- End code ---

I need it all on one line.

And also i will replace all content. I setup it like this so i wouldn't overwrite the data. Still does...


--- Code: ---    $Playerdata::ID[%client.BL_ID] = %client.BL_ID;
$Playerdata::Cash[%client.BL_ID] = %client.cash;
$Playerdata::Education[%client.BL_ID] = %client.ed;
    export("$Playerdata::*", $logFile, false);
--- End code ---

doing it this way won't replace all content just the content under that bl id:


--- Code: ---       $LoggedIP[%client.BL_ID] = %client.cash TAB %client.ed;
       export("$LoggedIP*", $logFile, false);
--- End code ---


--- Quote from: Nexus on June 12, 2011, 01:19:46 PM ---edit: lol you should just make one megathread for all your coding help topics.  I think you have like 30.

--- End quote ---
Lol. Sorry i just really want to learn this stuff.
Nexus:

--- Quote from: tyler0 on June 12, 2011, 01:31:01 PM ---I need it all on one line.

--- End quote ---

No you don't
The point of exporting an array is so you can execute that file.  Exec doesnt care how many lines your data is on.
Navigation
Message Index
Next page

Go to full version