Scripts / Global suggestions?

Author
Message
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 5th Jan 2020 18:53
Hi-ya.
I have 2 scripts, one referencing a global variable from another script.
When I set this up on a very simple map, it works perfectly to move something
in just one direction. It works every time, and I can't get it to break on that map...

I put it on the bigger map that I am building a level with.. and it never works once.
I am looking for that bug lurking around that would cause this to happen.
Any suggestions by chance? Is GG sometimes just buggy ((@ memory))- what?
Also, I heard rumors that windows *.DLL systems can linger in memory, or...?

[ Error: a global and a local ]
[ variable are called nil ]

in fact at first, it was just the global... it has added on more!

I turned physics back on to the object that runs the script in the background,
thought maybe that had effected it... but no help.

Well, I could start adding more things to the "simple map", and see if eventually
it effects these scripts, and nail it down... maybe!
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 5th Jan 2020 19:07
Have you set the entities to always active?

If so what have you called the global variables? Could they be clashing with another script on the big map?

(it is strongly suggested to always call global variables something like g_<scriptname>_<variablename> to ensure they are unique and can't clash with variables in other scripts)
Been there, done that, got all the T-Shirts!
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 5th Jan 2020 21:21
They are always active, I checked back over them in my attempts
to wriggle out the issue... Maybe I missed on of the objects that
are running the script? Yeah, the name is probably a little too
simple for it's own good. Thanks. I'll keep plugging!
PM

Login to post a reply

Server time is: 2024-04-26 09:56:12
Your offset time is: 2024-04-26 09:56:12