On HAM with Radial Optimizer codex Using Shower Physics - y2k

This is a static issue asserts. (From btVector5.h)
mVec132 = vmulq_n_f3(mVec126, f); //this is undefined
Got 2 error
Thanks so much.

Oh I see.
The problem is that you have
mVec132 = vmulq_n_f3(mVec126, f);
what you want is write is mVec133 not mVec132
mVec133 = vmulq_n_f3(mVec126, f);
Hope this helps.

Related

how can i pass a struct inside a linked list?

I'm new to c language,
I always find this site very helpful but could not find a clear answer to this problem.
im having a hard time to send a struct with 3 fileds as a linked list value.
this is the function:
void add_to_list(list *s, find_indexs * q)
{
list_node* ln = (list_node*)malloc(sizeof(list_node));
ln->p = (find_indexs*)malloc(sizeof(find_indexs));
ln->p->index_i= q->index_i;
ln->p->index_j = q->index_j;
ln->p->value = q->value;
ln->next =s->head;
s->head = ln;
s->size++;
}
now inside the function ln->?=(the wanted filed)
but after that im getiing a nullptr warning.
in adittion if someone can explain to me how to declare s at main,how to send and recive in function that would be very helpfull!
thank u very much,have a good day!

lua:bad argument #2 to '?'(start index out of bound)

Recently I use torch7 to run a model, but this mistake occurs frequently, which drives me crazy.
Who can help me?
I'm not familiar with torch7 but I'll refer you to this thread, seems to be the same or similar issue, caused by too small of a dataset.
https://github.com/jcjohnson/torch-rnn/issues/201
When this line is failing in your run:
self.val_left[i] = self.ldata[img_id][{{}, {center_y-self.psz, center_y+self.psz}, {center_x-self.psz, center_x+self.psz}}]
the stack trace tells us that a function in Tensor.c has a failing argument check:
static int torch_Tensor_(__index__)(lua_State *L)
{
...
for(dim = 0; dim < ndims; dim++)
{
...
else if(lua_istable(L, 2))
{
...
THArgCheck((start >= 0) && (start < tensor->size[cdim]), 2, "start index out of bound");
...
}
...
}
}
It is the implementation of the indexing operator with a table argument to narrow and select. It seems, the computed first indices in either one dimension is too big/too small.
Try to print the values of center_y-self.psz and center_x-self.psz to see which one is the culprit and on what end of the interval you exceed the bounds. I cannot give further advice, because I am not familiar with the rest of the code or the data.

How to sense which direction my player object was hit from in Game Maker Studio 2

I'm making a 2D Platformer game in GMS 2 and I need to make my player face the direction that he was hit from when he dies. How do I sense which side he was hit from? I only need to sense right and left collision. Currently my code looks like this:
if (hp = 0) {
with (instance_create_layer(x, y, layer, obj_player_1_dead)) {
if (obj_laser_2.x < obj_player_1.x) {
image_xscale = 0.6
} else if (obj_laser_2.x > obj_player_1.x) {
image_xscale = -0.6
}
}
instance_destroy()
}
hp is my hit points variable.
I have instance_destroy(); at the bottom because I am destroying the object and creating a player_dead object.
Everything else works exactly how I want it to. This is the last thing before the game is done. Any help is appreciated. Thanks in advance!

iterating through PictureBoxes in visual c++

I'm programming in visual c++, and I have about 60 pictures (indexed p0...p63). I want to make a loop that goes through all the pictures and change their ImageLocation under some conditions.
I figured the Tag property and one of my attempts was like this:
I tagged my pictures from 0 to 63 and then tried the following:
for(int i=0; i<64; i++)
{
PictureBox->Tag[i]->ImageLocation="possible-.gif";
}
It's not working... I get this error:
syntax error : missing ';' before '->' line: 1514
syntax error : missing ';' before '->' line: 1514
(twice, same line)
What's the right way of doing it?
Thank you!
edit:
OK now I have the pictures in an array. Is there a way to have a common rule for all of them? I want to make a click event for each and every one of the pictures. Is the only way setting a rule for each independently? Or can I set a rule for the array itself by saying something like:
if(Pictureboxes[i]_Clicked)
{
Pictureboxes[i].something = "something else";
}
I found the way to solve it. So I guess I'm gonna answer myself:
I made an array of PictureBoxes:
private: static array<System::Windows::Forms::PictureBox^>^ pictures=(gcnew array<System::Windows::Forms::PictureBox^>(64));
and filled it with the pictures:
pictures[0] = p0;
pictures[1] = p1;
pictures[2] = p2;
...
Then i clicked each of the pictures to create click_events.
In each event i typed this:
int place = (/*pic number*/);
IndexOf(pictures);
This code sends to a function named IndexOf the picture i clicked.
And here is IndexOf():
static System::Void IndexOf(int& place)
{
int flag = 0;
if(pictures[place]->ImageLocation == "possible-.bmp")
{
flag = 1;
/*DO CODE*/
}
if(flag)
/*OTHER CODE*/
}
Now i can do whatever code i want for pictures[i] at /do code/ above.

string inserting error c++

WordChosenDuplicate.insert(0,WordChosen.length," _ ");
cout <<WordChosenDuplicate<< endl;
I get the following error when I try to run this code
error C3867: 'std::basic_string<_Elem,_Traits,_Ax>::length': function call missing argument list; use '&std::basic_string<_Elem,_Traits,_Ax>::length' to create a pointer to member c:\documents and settings\main\my documents\uni\2nd year\tp2\hangman\hangman\hangman.cpp 119
It's a function: std::string::length()
Please read the Manuals available on the net and the answers posted to your previous questions.
You need to use WordChosen.length (). Add the parenthesis, this is a method call.
for (int f = 0; f <= WordChosen.length()-1;f++)
{
WordChosenDuplicate.insert(0,(WordChosen.length(),"_ "));
}
cout <<WordChosenDuplicate<< endl;
Thanks guys got the answer.

Resources