Show Posts

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.


Messages - SeventhSandwich

Pages: 1 ... 231 232 233 234 235 [236] 237 238 239 240 241 ... 1505
3526
So I have an issue, where I have a command that opens up two separate GUI windows, both modeless so that players can interact with both at the same time. One of them is the 'player inventory' GUI that shows all the player's current items, and another is a backpack window where (eventually) they'll be able to deposit their excess items into.

I have it set up so that the close commands on the backpack window call this function:
Code: [Select]
clientCmdOpen_BQSmallRuckSackGUI(%client,1);

Which is declared like this:

Code: [Select]
//wrapper function that first builds the player inventory GUI and then shows it
function renderPlayerInventory(%client) {
commandToServer('buildPlayerInventory',%client);
canvas.pushDialog(BQPlyrInvGUI);
}

//handles opening and closing of the inventory GUI.
function clientCmdOpen_BQSmallRuckSackGUI(%client,%toggle)
{
if(%toggle)
{
if(BQSmallRuckSackGUI.isAwake())
{
//closes GUIs
canvas.popDialog(BQSmallRuckSackGUI);
canvas.popDialog(BQPlyrInvGUI);
return true;
}
else
{
//opens GUIs
if(!BQPlyrInvGUI.isAwake())
{
renderPlayerInventory(%client);
}
canvas.pushDialog(BQSmallRuckSackGUI);
return true;
}
}
}

The only problem is that when I press the exit button (either the actual exit button on the GUI, or my accelerator key 'escape') after interacting with some of the buttons, my game crashes immediately. Trace(1); doesn't seem to have any helpful input either when I run it during the error.

Is calling close on a window not allowed if you do so through a function? Or is the problem just the fact that I'm doing so on two windows at once? Changing the closing command on my window from what's written above to 'canvas.popDialog(BQSmallRuckSackGUI);' seems to work fine and does not crash my game, so I'm certain that the Open_BQSmallRuckSackGUI() function is the problem.

Is this some kind of known issue, or have I just screwed something up and broken the game?

3527
Off Topic / Re: German Bikers defend their women from rapefugees
« on: August 02, 2016, 11:37:28 PM »
So, a lynch mob?

3528
Off Topic / Re: Steven Universe Megathread - Crack the Whip
« on: August 02, 2016, 10:54:43 PM »
Right now it's just filler.
World-building, bruh.

3529
i'm LGBT and voting third party - this loving infuriates me. do liberals actually believe this?
I mean, it's essentially true. Isn't it convenient that Annoying Orange supporters shy away from bagging on Jill Stein? They know that a vote for Stein is basically a vote for Annoying Orange.

3530
My main point with the image was the "i want to get of 2016's wild ride" part, but i figured i'd credit the whole post
see now I feel like a party pooper. you've gotta put a cookie monster or something next time

3531
idk what's up with this graph but it's kinda misleading because clinton definitely doesn't have that much of a lead, it's just returned more to normal, but we'll see how this trend continues

http://www.realclearpolitics.com/epolls/2016/president/us/general_election_Annoying Orange_vs_clinton-5491.html
It's a probabilistic graph from 538. Clinton is only 7 points in the lead, but the effect that that has on her chance of winning if an election was held today is massive.

Arguably, the graph is less misleading because it actually puts the candidates' chances in context.

Relevant

old data

3532
Clinton's convention bounce took effect and she's very, very far in the lead right now.

Of course it's a temporary boost, but you should update thread title.

3533
Off Topic / Re: Bioenergetics
« on: August 01, 2016, 03:16:51 PM »
I've always kind of wondered why there's always been so much overlap between bodybuilding and new age stuff.

3534
Drama / Re: [READ IF YOU'RE NEW] Please stop making stuff drams
« on: July 31, 2016, 04:37:42 AM »

I edited this image originally, and I feel so honored whenever you post it.

3535
can you explain further how to use these with the latter command, and/or link the topic you found? iirc serverDirectSaveFileLoad() takes in only 4 parameters: directory, colormethod, something im not sure, and ownership
You declare those global variables and then call ServerLoadSaveFile_Start(); and it uses those settings when loading a file.

3536
Ah okay, so I figured out the problem.

The variable $LoadingBricks_BrickGroup is only not overwritten and taken into account if you use ServerLoadSaveFile_Start( <save file> ); instead of serverDirectSaveFileLoad();.

I found an old thread by Port that has all of the variables associated with the former command, in case anyone else encounters this problem.

Code: [Select]
$LoadingBricks_BrickGroup = <brick group>;
$LoadingBricks_Client = <client>;
$LoadingBricks_ColorMethod = 3;
$LoadingBricks_DirName = missionInfo.saveName;
$LoadingBricks_DoOwnership = true;
$LoadingBricks_FileName = <save file>;
$LoadingBricks_PositionOffset = "0 0 0";
$LoadingBricks_Silent = true;
$LoadingBricks_StartTime = getSimTime();
ServerLoadSaveFile_Start( <save file> );

3537
I'd suggest creating a custom brick group(a sim object. Don't forget to add it to mainBrickGroup. Dump a brick group to see the fields you should fill when you make it) and then directing $LoadingBricks_BrickGroup to your brick group. You can then use %group.chainDeleteAll(); to delete all of the bricks in your brick group(you might want to write your own method of chain deleting the bricks if you want it to be really efficient, because chainDeleteAll could be improved).
I've created a brickgroup $brick_group named BrickGroup_1337 and I've directed $LoadingBricks_BrickGroup to my brick group though:

Code: [Select]
$LoadingBricks_BrickGroup = BrickGroup_1337;

When I execute my code, I can type echo($LoadingBricks_BrickGroup.getName()); and it gives me BrickGroup_1337 as expected. However, after loading in a save, I repeat that command and it gives me BrickGroup_999999, as if it overwrote the variable before it even started loading bricks. The bricks loaded in are also part of BrickGroup_999999, and not BrickGroup_1337.

Here is my entire code that I've been using to test this:

Code: [Select]
$brick_group = new SimGroup(BrickGroup_1337) {
bl_id = "0";
isPublicDomain = "0";
};
mainBrickGroup.add($brick_group);
$LoadingBricks_BrickGroup = BrickGroup_1337;

function serverCmdDeleteGroup(%client) {
$brick_group.chainDeleteAll();
}


Do you have any ideas of what might be causing this?

3538
So my problem is as follows:

I'm loading in a small group of bricks with serverDirectSaveFileLoad with an offset, and I want to be able to unload that small group of bricks without needing to individually delete each loaded brick.

It would be great if there was a way for me to get an array of the objectIDs for the bricks I've loaded in, but as far as I can tell there isn't a built-in way to accomplish this.

What do you guys suggest for this? For my project, I have to load and unload bricks almost every second, which means that unloading bricks can't be too slow/complex.

3539
Off Topic / Re: Who was the worst person in Blockland's history?
« on: July 30, 2016, 06:17:56 PM »
If we're voting on the overall quality of the person, my vote is on Kalphiter. Almost everyone else on that list has moved on with their life, and they're better people as a result. Kalphiter spent a solid year of his life trying to run a grassroots defamation campaign against Blockland and only gave up so that he could come back to the game and start playing it again. He could actually get into professional software development, but I doubt that he ever will because he's such an obsessive manchild.

3540
It might just be me but Donald Annoying Orange doesn't age like a normal person
that's because he's covered in 3cm of cheetle all over his body.

Pages: 1 ... 231 232 233 234 235 [236] 237 238 239 240 241 ... 1505