L2Tower Discord Let's keep the community alive with discord. Discussions about plugins and scripts L2Tower Discord

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help variable
Author Message
cicciobello69 Offline
Expired VIP Member
**

Posts: 6
Joined: Apr 2013
Reputation: 0
Version: 1.4.2.138
Post: #1
Help variable

hi,
I can pass variables from one file to another?
type
if i have a program "myzone" that should call another file to teleport "gklist" there is a way to pass variables?
are ch I have to go heine.
"myzone" you see I'm in ch called the file "gklist" and step rune-> heine

Thx
11-07-2014 18:57 PM
Find all posts by this user Quote this message in a reply
Vinter Offline
Expired VIP Member
**

Posts: 299
Joined: Sep 2013
Reputation: 109
Version: 1.4.1.128
Post: #2
RE: Help variable

I don't see why would you need that, you can easily do it all in one file.

Anyhow, using Include function you can include other files into your script/plugin.
11-09-2014 23:36 PM
Find all posts by this user Quote this message in a reply
tophersoccer Offline
Expired VIP Member
**

Posts: 422
Joined: Aug 2012
Reputation: 142
Version: 1.4.3.143
Post: #3
RE: Help variable

there is a way to load other lua code in a script.

    LUA Programming
local file2 = assert(loadfile(GetDir() .. "\\scripts\\library\\detectClass.lua"))
file2()



this loads another script into your current one so you can use its functions and variables just like if it is in the same file.
(This post was last modified: 11-10-2014 21:36 PM by tophersoccer.)
11-10-2014 21:36 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)