mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-07 15:32:25 +00:00
clarified variable declaration
parent
afcc284acf
commit
15ff211319
@ -58,9 +58,10 @@ end
|
||||
|
||||
```
|
||||
-- this is an example of how to track time on an NPC.
|
||||
-- time_a is declared local outside of a function to be available later.
|
||||
local time_a = os.time();
|
||||
|
||||
function event_spawn(e)
|
||||
-- time_a is declared global to be available later.
|
||||
time_a = os.time();
|
||||
-- os.time(); returns an integer value in seconds.
|
||||
e.self:Shout("The time is now: "..time_a);
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user