SRL Archive - OSR Help

Finding the current procedure/function ?


Dervish

2013-01-05 17:20:11

The current script I'm making requires huge amounts of failsafes and so I was wondering whether it is possible to find out which procedure and function is currently being processed and thus making something like :

procedure FailSafes(Failsafe);

Failsafe being determined by the current procedure.

For example : during login, Failsafe(var) would correspond to a certain Failsafe designed for this exact moment.

Thanks in advance.

Brandon

2013-01-05 17:23:26

Yes..

1. Create a Global Variable that possibly takes a string or an Enum.
2. In each function, initialize that Enum/string to the corresponding value.
3. In your Failsafes function, Switch case that string/enum and see which function was called.. Or do an if-else.

I don't know of anyway to compare pointers/addresses in Pascalscript..

Dervish

2013-01-05 17:26:44

From: Brandon
Yes..

1. Create a Global Variable that possibly takes a string or an Enum.
2. In each function, initialize that Enum/string to the corresponding value.
3. In your Failsafes function, Switch case that string/enum and see which function was called.. Or do an if-else.

I don't know of anyway to compare pointers in Pascalscript..


I must be tired, it's so simple.. Thank you Brandon.