Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: stuh505 on Sat 06/11/2004 01:02:18

Title: ags plugin support bug
Post by: stuh505 on Sat 06/11/2004 01:02:18
there appears to be a slight bug in the plugin support that doesn't allow the plugin features to be used in the global script outside of the main functions (ie, where you would define global variables). 
Title: Re: ags plugin support bug
Post by: Pumaman on Sat 06/11/2004 22:32:12
Can you provide an example of what you mean? I'm not really sure what you're getting at.
Title: Re: ags plugin support bug
Post by: stuh505 on Sat 06/11/2004 22:42:59
Alright.

At top of global script file:

int fstep = 1; WORKS
int fstep = ints_to_float(0,050); DOESNT WORK


In repeatedly execute:

int fstep = ints_to_float(0,050);  WORKS

(ints_to_float(a,b) is a plugin function)
Title: Re: ags plugin support bug
Post by: Pumaman on Sat 06/11/2004 22:49:23
That's nothing particular to plugins -- global data cannot be initialized with a function call. You need to place any such initialisation in game_start.
Title: Re: ags plugin support bug
Post by: stuh505 on Sat 06/11/2004 23:00:22
Interesting.  Okay then, thanks.