106
Modification Help / Message lines are being cut short
« on: February 14, 2015, 06:29:38 PM »(bottom print, 2 chat messages reading the same thing)
Is there a way around that, or is this some torque limitation?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
package MiningLiquidPackage {
function PlayerStandardArmor::onEnterLiquid(%data,%obj,%coverage,%type) {
talk(%data SPC %obj SPC %coverage SPC %type);
%obj.schedule(100,doLiquidLoop);
return parent::onEnterLiquid(%data,%obj,%coverage,%type);
}
function PlayerStandardArmor::onLeaveLiquid(%data,%obj,%coverage,%type) {
cancel(%obj.liquidLoop);
talk(%data SPC %obj SPC %coverage SPC %type);
return parent::onLeaveLiquid(%data,%obj,%coverage,%type);
}
};
activatePackage(MiningLiquidPackage);
function Player::doLiquidLoop(%this) {
cancel(%this.liquidLoop);
%this.liquidLoop = %this.schedule(500,doLiquidLoop);
%player_pos = %this.getPosition();
%player_pos[x] = getWord(%player_pos,0);
%player_pos[y] = getWord(%player_pos,1);
%player_pos[z] = getWord(%player_pos,2);
// ugh
// can't %array[%another[1]] and it SUCKS
if(%player_pos[x] < 0) {
%player_pos_xf = mCeil(%player_pos[x] - (%player_pos[x] % 4));
} else {
%player_pos_xf = mFloor(%player_pos[x] - (%player_pos[x] % 4));
}
if(%player_pos[y] < 0) {
%player_pos_yf = mCeil(%player_pos[y] - (%player_pos[y] % 4));
} else {
%player_pos_yf = mFloor(%player_pos[y] - (%player_pos[y] % 4));
}
if(%player_pos[z] < 0) {
%player_pos_zf = mCeil(%player_pos[z] - (%player_pos[z] % 4));
} else {
%player_pos_zf = mFloor(%player_pos[z] - (%player_pos[z] % 4));
}
%brick = $Mining::Brick[%player_pos_xf,%player_pos_yf,%player_pos_zf];
if(!isObject(%brick)) {
talk("NOT OBJECT" SPC %brick SPC "$Mining::Brick[" @ %player_pos_xf @ "," @ %player_pos_yf @ "," @ %player_pos_zf @ "]" SPC %this.getPosition());
return;
}
%brick_box = %brick.getWorldBox();
%brick_box[x1] = getWord(%brick_box,0);
%brick_box[y1] = getWord(%brick_box,1);
%brick_box[z1] = getWord(%brick_box,2);
%brick_box[x2] = getWord(%brick_box,3);
%brick_box[y2] = getWord(%brick_box,4);
%brick_box[z2] = getWord(%brick_box,5);
if(%player_pos_xf >= %brick_box[x1] && %player_pos_yf >= %brick_box[y1] && %player_pos_zf >= %brick_box[z1] && %player_pos_xf <= %brick_box[x2] && %player_pos_yf <= %brick_box[y2] && %player_pos_zf <= %brick_box[z2]) {
if(%brick.liquidObj != -1) {
talk("IN" SPC %brick SPC "$Mining::Brick[" @ %player_pos_xf @ "," @ %player_pos_yf @ "," @ %player_pos_zf @ "]" SPC %this.getPosition());
} else {
talk("NOT LIQUID" SPC "$Mining::Brick[" @ %player_pos_xf @ "," @ %player_pos_yf @ "," @ %player_pos_zf @ "]" SPC %this.getPosition());
}
}
}
POST /postServer.php HTTP/1.0
Host: [REMOVED]
Content-Type: application/x-www-form-urlencoded
Content-Length: 163
ServerName=Freebuild&Port=28000&Players=1&MaxPlayers=6&Map=Freebuild&Mod=&Passworded=1&Dedicated=0&BrickCount=0&DemoPlayers=0&blid=18701&Uptime=4944948474&csg=1800&ver=21&build=1931
2014/10/14 09:44:47 [error] 6958#0: *802 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined index: ver in /srv/http/blmaster/postServer.php on line 16
PHP message: PHP Notice: Undefined index: build in /srv/http/blmaster/postServer.php on line 16
PHP message: PHP Notice: Undefined index: Uptime in /srv/http/blmaster/postServer.php on line 16" while reading response header from upstream, client: [my IP], server: [my custom master server's URL], request: "POST /postServer.php HTTP/1.0", upstream: "fastcgi://127.0.0.1:64000", host: "[my custom master server's URL]"
==>trace(1);
Console trace is on.
Leaving ConsoleEntry::eval() - return
Entering ConsoleEntry::eval()
==>RTB_registerPref("Admin Only", "Duplorcator", "Pref::Duplorcator::AdminOnly", "bool", "Tool_Duplicator", 0, 0, 0);
Entering RTB_registerPref(Admin Only, Duplorcator, Pref::Duplorcator::AdminOnly, bool, Tool_Duplicator, 0, 0, 0)
Leaving RTB_registerPref() - return 0
Leaving ConsoleEntry::eval() - return
Entering ConsoleEntry::eval()
==>trace(0);
Branch | Download |
Stable | N/A |
Unstable | http://parrokeet.duckdns.org/blockland/repo/Support_Preferences/unstable/Support_Preferences.zip |
%category | Defines in what list this pref shows up in, e.g. "General", "Admins", etc. It will appear in the list on the left. |
%name | Defines what the player will see beside inputs, e.g. "Admin Password", "Falling Damage", etc. |
%type | Defines what type the variable is. See below for the list of types. |
%variable | The affected variable. |
%default_value | The default value if nothing is set for the variable. |
%hide | If 0, update messages are allowed. If 1, they're always hidden. Useful for passwords. |
%callback | Command to call when the variable updates. |
%arguments | Arguments for the called command. |
added in v0.7.0-dev-2Port: needs callbacks
»TheBlackParrot«: callbacks as in
Port: being able to specify a function to call when the pref is changed
function onServerDestroyed()
{
$Duplorcator::PrefsLoaded = 0;
parent::onServerDestroyed();
}
Branch | Download |
Stable | N/A |
Unstable | http://parrokeet.duckdns.org/blockland/repo/Client_MusicPlayer/unstable/Client_MusicPlayer.zip |
Branch | Download |
Stable | N/A |
Unstable | N/A |
Testing | http://parrokeet.duckdns.org/blockland/repo/Client_Stylish4BL/testing/Client_Stylish4BL.zip |
function formatNumber(%num)
{
%len = strLen(%num);
if(%len < 4)
return %num;
while(%len > 3)
{
%formatted = %formatted @ "," @ getSubStr(%num,%len-3,%len);
%len -= 3;
}
return getSubStr(%num,0,%len) @ %formatted;
}
This works up until you get to a 7-digit number. strLen seems to work until a 10-digit number is reached. Am i missing something here?