Returning from a map script?
Displaying 1-6 of 6 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Buckermann

Is it possible to return from a function inside a map script back to the previous function?

Like this (in the system.vc):

void SomeFunction()
{
int result = map("somemap.map");
}

And in the starting function of the map script:

void start()
{
int SomeInt = DoSomeStuff();
return SomeInt;
}

Right now, if I just use "return;" verge hangs only around. It dosen't looks like it is returning to the original function.

Posted on 2004-06-02 22:16:07

vecna

It doesnt work that way. A map() command is like a super-return statement of sorts, it triggers a vc engine killswitch that returns out of absolutely everything, and then triggers the map startup command as the base level vc function. Its necessary for it to function that way. If you want something to happen immediately after the map is loaded, you should put it in the map startup script instead.

Posted on 2004-06-02 22:50:07

chanman

so when you call teh map() function, iy "kills" all other functions...like:


autoexe()
{
function1(stuff)
{
function2()
{
map(stuff);
}
}
}


so, it would kill function2, function1, and autoexe?

Posted on 2004-06-02 23:53:11

Buckermann

Thanks for the clarification Vecna.
Knowing this, I can work with it.

Posted on 2004-06-03 00:42:46

mcgrue

This behavior has now been documented.

FYI: The maped 3 docs linked there have not been activated for the public yet, and the section on map/system vc has not been filled in yet either.

Posted on 2004-06-03 01:39:41

blues_zodiakos

However, it DOES NOT KILL A RETRACE HOOK. You can use this to your advantage. :D

Posted on 2004-06-03 17:36:37


Displaying 1-6 of 6 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.