Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,507 guests, and 12 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
why does it say dangerous instruction, when I use this event? #326517
06/01/10 14:33
06/01/10 14:33
Joined: Nov 2008
Posts: 196
the wrong place
Muhsin Offline OP
Member
Muhsin  Offline OP
Member

Joined: Nov 2008
Posts: 196
the wrong place
Hi!

why does it say dangerous instruction, when I use this event:

------------------------------------------------------------
function trace_back()
{
my = me;
if (event_type == EVENT_SCAN)
{
if (you.skill47 == 1234) // scanned by a node
{
my.skill45 = handle(you);
trace_mode = IGNORE_ME + IGNORE_MODELS + IGNORE_PASSENTS;
if (trace (my.x, you.x) == 0)
{
you = ptr_for_handle(my.skill45); // restore the "you" pointer
index = you.skill48 + my.skill48 * max_nodes;
node_to_node[index] = vec_dist(my.x, you.x);
}
}
else // scanned by the drone (skill47 = 5678)
{
my.skill45 = handle(you);
trace_mode = IGNORE_ME + IGNORE_MODELS + IGNORE_PASSENTS;
if (trace (my.x, you.x) == 0)
{
you = ptr_for_handle(my.skill45);
dist_to_drone[my.skill48] = vec_dist (my.x, you.x);
if ((dist_to_drone[my.skill48] < min_drone) && (dist_to_drone[my.skill48] != 0))
{
min_drone = dist_to_drone[my.skill48];
}
wait (2);
if (dist_to_drone[my.skill48] == min_drone) // this is the closest node to the drone?
{
start_node = my.skill48;
}
}
else
{
dist_to_drone[my.skill48] = 0;
}
}
}
}
------------------------------------------------------------

I got it from the AUM, but I can't make it work, why?

thanks!

- Muhsin Kaymak


Come and play my new browsergame - Valley Of Wolves:

http://www.mafiacreator.com/ValleyOfWolves

Hurry and be the first to take over the different business' in the Valley Of Wolves, before anybody else does it!
And be the most feared MafiaBoss in the World!!
Re: why does it say dangerous instruction, when I use this event? [Re: Muhsin] #326519
06/01/10 14:39
06/01/10 14:39
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline

Programmer
Lukas  Offline

Programmer

Joined: May 2007
Posts: 2,043
Germany
Try adding a wait(1); at the beginning of the event.
If there is no wait(1); at the beginning of the event, the event could trigger itself again leading to an endless loop. That's what's "dangerous" about it. wink

Re: why does it say dangerous instruction, when I use this event? [Re: Lukas] #326521
06/01/10 14:47
06/01/10 14:47
Joined: Nov 2008
Posts: 196
the wrong place
Muhsin Offline OP
Member
Muhsin  Offline OP
Member

Joined: Nov 2008
Posts: 196
the wrong place
Thank you very much!

I have been trying to solve this problem the whole day.

it works! thanks again!

- Muhsin Kaymak


Come and play my new browsergame - Valley Of Wolves:

http://www.mafiacreator.com/ValleyOfWolves

Hurry and be the first to take over the different business' in the Valley Of Wolves, before anybody else does it!
And be the most feared MafiaBoss in the World!!

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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