I found the line that is killing the game:
free(ptr);
if I remove this no more abort... it's done! :D
now, wth this make the game freeze? when I free per exemple p without problems?
Type: Posts; User: hajas
I found the line that is killing the game:
free(ptr);
if I remove this no more abort... it's done! :D
now, wth this make the game freeze? when I free per exemple p without problems?
I found the line that is killing the game:
free(ptr);
if I remove this then no more abort... it's done! :D
now, wth this make the game freeze? when I free per exemple p without...
I don't know what's is causing the overflow, please take a look on my code in that link. (last post) and please tell where could have this problem.
thanks alot!
Hello,
so I'm having a little problem in my code, which is making the game abort after the 3rd time is loading... I'm trying to fix a bug in Quake 2 Evolved.
I think is something releated of...
Ok, I done everything that I could to fix the siamese twins bug, and I FIXED!!!! :D
but I'm having a little problem.... when I quit the server the game abort, or when I change the map for the 3rd...
thanks! work great!
how can I do the inverse of atoi? here's the code
Num = atoi(PartC); // Convert to Number
Num += 15; //add 15
strcat(String, ToString(Num));
or something like that
thanks for your explanation! now I understand! :P
thanks m8! worked great! :D
Hello, I'm trying to find the second space inside a array, here's my code:
Space=0;
PL=12; //came from another function that is working right!
PB=0;
// find PartB from start of...
worked now!
char *ptr = malloc(151);
strcpy(ptr,NewStr);
origem = strstr(ptr, "origin"); //find the origin position
loc = origem-ptr;
free(ptr);
seams that I can't create pointers... is just create one more than the game abort.
is there a way to do that search? why not working the i+1 index that I did? I remember to do this a lot in the...
NewStr is a array... could be that?
char NewStr[150];
didn't work, make the game abort... any other way? maybe without use pointers?
thanks!
Hello, I want to search for a string inside one array, and get the position (index) of the first (or last) char when this was found... I tryed this searching for "play":
while...
converting to a pointer, I'll be able to do something like this?
char *array=malloc(150 *sizeof(int));
char HStr[2000];
while ((HStr[j] != '}') || (HStr[j]=='\0')){
...
how can I erase a array?
char array[150];
loopA{
loopB{
do work over array;
}
remove everything, then I'm trying part by part... but I'm stuck in the first one.
any of what you post worked.
/*
=================
CM_LoadEntityString
=================
ok, I need do a malloc... but about my loop? is right?
is just because I do not alloc/free mem that didn't work? or what I did isn't possible to do with pointers like I did? or BOTH???
thanks...
hmmm... so how I get the same result as the loop below using pointers?
char *String;
char *NewStr;
while (String[j] != '}'){
NewStr[i] = String[j];
i++;j++;
}
but this is a pointer right?
I'm like this:
char *String;
char NewStr[];
thanks... but I have a little problem here.
I will only know the *String after few lines of code... so I can't know the lenght of this when I declare the strings... is possible to change the size...
how can I copy a string like *String to a string like String[]? and vice-versa?
thanks!
thanks for all the help... but few things I'm still in doubt....
look:
while ( HStr[j] != '}' ) { // copy to NewStr each Class
NewStr[i] = HStr[j];
...
Hello,
I'm trying to fix the siamese twins bug in Quake 2, but I'm working with Quake 2 Evolved to be more precise...
in resume mappers put the info_player entity a little below the surface to...