16 posts
Posted 29 May 2014 - 03:51 PM
First, thank you for helping out. I'm at work daydreaming about being at home testing this out but figured I would get better info asking you guys directly. I know it's my own ignorance but this feels linear like QBasic (thumbs up), and not sure how OOP the default API can be.
- Can I execute a secondary script without interrupting the first script?
- Can I return data from the secondary script without interrupting the first script?
- Can I make my own Classes without having server side access?
Thanks again for the assistance.
8543 posts
Posted 29 May 2014 - 06:12 PM
1. Sort of.
2. Sort of. Probably not how you're thinking, though.
3. What do you mean by "Classes"?
570 posts
Posted 29 May 2014 - 06:21 PM
3. What do you mean by "Classes"?
I believe he means classes from object-oriented programming. Yes,
you can. It's not as convenient as in other languages but it works.
16 posts
Posted 29 May 2014 - 06:30 PM
Thanks for the reply Lyqyd.
Classes: like a permanent function/method on another script outside of the current scope of the script currently running. I suppose it could be fudged by having other terminals running individual scripts and grabbing variables from those when needed. I don't know though =x
3. What do you mean by "Classes"?
I believe he means classes from object-oriented programming. Yes,
you can. It's not as convenient as in other languages but it works.
Perfect! I'll take a gander.
7083 posts
Location
Tasmania (AU)
Posted 30 May 2014 - 01:13 AM
It sounds like you may find
this API tutorial to be worth a read.
If there's a specific block of code you intend to port or whatever, then you may be better off linking to (or at least describing) it here. We can't really comment on the best way to do something in Lua without knowing exactly what that something is.
Lua is indeed very similar to QB, but (at least in CC) you'll be relying a lot on events.