Gamestudio Links
Zorro Links
Newest Posts
SGT_FW
by Aku_Aku. 11/30/26 08:19
Removing outliers from files
by JeyKey II. 11/29/26 10:01
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (JeyKey II, AndrewAMD, EvanTJ), 5,495 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
E1513 Crash maybe bug? verry curious #293953
10/15/09 05:06
10/15/09 05:06
Joined: Oct 2009
Posts: 14
U
uniquy Offline OP
Newbie
uniquy  Offline OP
Newbie
U

Joined: Oct 2009
Posts: 14
Hi, sitting on this for 3 hours... and i realy think, that it only can be a BUG.

In this minimalistic code, you can see 2 "BAD" lines.
If one of it is removed, the code work.
Otherwise, together, i get:

Code:
E1513 Crash in ModelAdded



But whats realy crazy: If i set the ModelAdded function to just 1 parameter (ENTITY* ent_added), it works fine too.

Code:
#include <acknex.h>
#include <default.c>

ENTITY* ent;

void ModelAdded(ENTITY* ent_added, STRING* var_val){
	FONT* font1 = "Arial#18b";
	VECTOR* tmp;
	VECTOR* tmp2;
	
	vec_set(tmp.y, tmp2.y); // BAD LINE 1
	
	TEXT* txt = txt_create(1,1); // BAD LINE 2
}

void main()
{
	level_load("level.wmb");
	wait(3);
	
	ent = ent_create("cube.mdl",vector(0,0,0),NULL);
	ModelAdded(ent,"test");
}



Last edited by uniquy; 10/15/09 05:14.
Re: E1513 Crash maybe bug? verry curious [Re: uniquy] #293954
10/15/09 05:20
10/15/09 05:20
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey

actual bad lines are this three;

FONT* font1 = "Arial#18b";
VECTOR* tmp;
VECTOR* tmp2;

on runtime you have to create fonts with font_create,
FONT* font1 = font_create("Arial#18b");

and then, tmp and tmp2 are just VECTOR pointers and not VECTORs and they are currently pointing to nothing, if you try to use them youll get a crash.
so change this lines:
VECTOR* tmp;
VECTOR* tmp2;
with:
VECTOR tmp;
VECTOR tmp2;

---

and before sitting in front of it 3 hours, and thinking it can only be a bug, check the manual.


3333333333
Re: E1513 Crash maybe bug? verry curious [Re: Quad] #293956
10/15/09 05:34
10/15/09 05:34
Joined: Oct 2009
Posts: 14
U
uniquy Offline OP
Newbie
uniquy  Offline OP
Newbie
U

Joined: Oct 2009
Posts: 14
oh sh.. im sorry! checked the manual many times, and searched here, but... ouph, could be eek im a noob o.O

But realy thanks!

Re: E1513 Crash maybe bug? verry curious [Re: uniquy] #307445
01/29/10 12:50
01/29/10 12:50
Joined: Jan 2008
Posts: 11
A
AloC83 Offline
Newbie
AloC83  Offline
Newbie
A

Joined: Jan 2008
Posts: 11
here's another noob who spent 3 hours trying to solve this problem!

fellow noobs, beware of the difference between VECTOR and VECTOR* (between any pair of data type and pointers to that data type for that matter)

Re: E1513 Crash maybe bug? verry curious [Re: AloC83] #307496
01/29/10 17:16
01/29/10 17:16
Joined: Apr 2009
Posts: 4
A
archie Offline
Guest
archie  Offline
Guest
A

Joined: Apr 2009
Posts: 4
At the very least, there was a "hint" in the Gamestudio Wiki under Scripts\Basic Hints "VECTOR Declaration" but probably that alone is not enough to completely remove such "growing pains".

Re: E1513 Crash maybe bug? verry curious [Re: archie] #307515
01/29/10 19:33
01/29/10 19:33
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

Also look for

Programming Trouble: FAQ

in manual wink


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C

Gamestudio download | 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