Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
2 registered members (3run, AndrewAMD), 667 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Strange crashes [Re: ] #426404
07/22/13 20:02
07/22/13 20:02
Joined: Jun 2010
Posts: 590
California
Ruben Offline OP
User
Ruben  Offline OP
User

Joined: Jun 2010
Posts: 590
California
Originally Posted By: Malice
I made you a example - its a little rough - see if this helps

https://docs.google.com/file/d/0B9Yxi-SUaV6QUmxYY253eGtiR0k/edit?usp=sharing

Is your example in the Main file on the link you sent me?

Re: Strange crashes [Re: Ruben] #426406
07/22/13 20:06
07/22/13 20:06

M
Malice
Unregistered
Malice
Unregistered
M



Download all file without funny extensions.

list
enemy.mdl
level_change_1.wmb
level_change_2.wmb
main.c
EDIT and door.wmb


sorry it's my first time using docs - upload to much junk


EDIT movement on wsad keys -- The bug is level_changer_to_2 is to close to the door..

Last edited by Malice; 07/22/13 20:09.
Re: Strange crashes [Re: Uhrwerk] #426407
07/22/13 20:09
07/22/13 20:09
Joined: Jun 2010
Posts: 590
California
Ruben Offline OP
User
Ruben  Offline OP
User

Joined: Jun 2010
Posts: 590
California
Originally Posted By: Uhrwerk
Your solution is perfectly fine. You can generalize it a bit (e.g. store the level to be loaded in the string1 of the entity so that you only have to write one event) but that's not the problem.

As far as I can see the code you posted is correct and won't cause any trouble. Please give us the COMPLETE ERROR MESSAGE. The messagebox does not just say "SYS", does it?

When I try to pass through the door ArenaToMain after I successfully passed through the MainToArena door, I get this error window that says this:

Error E1513
Script crash in ArenaToMain_f: SYS

I press the OK button, and then I get a window that says this:

acknex.exe has stopped working
A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available.
(There is then a button on this window that says: "Close Program". When you click it, the program ends)

Re: Strange crashes [Re: Ruben] #426408
07/22/13 20:11
07/22/13 20:11

M
Malice
Unregistered
Malice
Unregistered
M



That's a null pointer error

Your calling a pointer that has been removed


Also on my example if you get the *.wmp files you can look it over in wed

Re: Strange crashes [Re: ] #426410
07/22/13 20:22
07/22/13 20:22
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Now this function really shouldn't crash. Could you please try to recompile the corresponding level? Please also insert a "beep();" right at the start of the function of ArenaToMain_f. Please try to enter that level and report how many beeps you heard.
Originally Posted By: Malice
That's a null pointer error
It's the exact opposite. A null pointer error occurrs when you call a function that expects a non-null pointer. E1513 indicates that you try to access invalid memory for example through a vagabonding pointer or by exceeding array indices.


Always learn from history, to be sure you make the same mistakes again...
Re: Strange crashes [Re: ] #426412
07/22/13 21:04
07/22/13 21:04
Joined: Jun 2010
Posts: 590
California
Ruben Offline OP
User
Ruben  Offline OP
User

Joined: Jun 2010
Posts: 590
California
Originally Posted By: Malice
You can reload the original level and just vec_set(player.,location.x) instead of loading 2 wed files that are exactly the same.

I am trying to see if I can use this method.

In the main file, my player is initially stored at these location dimensions:

original vectors:

Local position: 8768.711 10173.895 -39.823
Local rotate: 92.000 0.000 0.000
World position: -8768.711 10173.895 -39.823

When the player enters the door from the Arena back into the Main level, I want the player to be stored at these location dimensions in the Main level (which would put the player's back up close and facing the door that leads back into the Arena from the Main level):

New vectors:

Local position: -8757.101 10943.625 -39.823
Local rotate: -91.000 0.000 360.000
World position: -8757.101 10943.625 -39.823

Would I have to store the values of one of these attributes into an array variable, and then use that array variable in the vec_set?

For example:
Code:
var world_position[3] = {-8757.101, 10943.625, -39.823};
vec_set(my.x, world_position.x);


?

Re: Strange crashes [Re: Ruben] #426414
07/22/13 21:15
07/22/13 21:15
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
You can do it the way you described.
This one is a little easier to write:
Code:
vec_set(my.x,vector(-8757.101, 10943.625, -39.823));



Always learn from history, to be sure you make the same mistakes again...
Re: Strange crashes [Re: Ruben] #426415
07/22/13 21:17
07/22/13 21:17

M
Malice
Unregistered
Malice
Unregistered
M



@Uhrwerk - Yes we are talking about the same thing, but once again my terms are wrong because of my lack of formal education. I apologize - I meant that he was trying to access a pointer that is invalid. I may still be wrong but I know if you get this error a pointer you are trying to use is invalid in some way. OR a array like you say - in this cause it takes me forever to figure it out.

@Ruban make a global array of all player_start_locations - start[total_levels * 3] . and all start angles ang_start[total_levels * 3]. and a global for the level( or use a string). Now in the player action

Code:
#define max_levels 10
var start[30]; // levels * 3
var ang_start[30]; // levels * 3

// or
// var start[level][3];
// var ang_start[level][3];
void fill_starts_starup()
{
  start[0] = a-number;
  ang_start[0] = a-number;
  start[1] = a-number;
  ang_start[1] = a-number;
  start[2] = a-number;
  ang_start[2] = a- number 
  // and on ect. ect.
} 
void load_me(var level_l)
{
 if(level_l == 1)
 level_var =0; // - EDITED move pos of this
 level_load(level_1.wmb);
 }

action player()
{
 player = me;
// Edited  removed the .x is not a VECTOR
 vec_set(my.x,start[level_var * 3]);
 vec_set(my.pan,ang_start[level_var * 3]);
 //  vec_set(my.x,start[level_var][0]);
 // vec_set(my.pan,ang_start[level_var][0]);


Last edited by Malice; 07/22/13 21:41.
Re: Strange crashes [Re: ] #426416
07/22/13 21:45
07/22/13 21:45

M
Malice
Unregistered
Malice
Unregistered
M



It seems easier to make invisible ents..

action spawn_point_a()
{
set(my,INIVISIBLE | PASSABLE);
while(!player) wait(1);
if(level_var == my.skill1)
vec_set(player.x,my.x)
vec_set(player.pan,my.pan);

}

Last edited by Malice; 07/22/13 21:46.
Page 2 of 2 1 2

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1