OpenLink Software

Usage stats on Lua Tutorial 2

 Permalink

an Entity in Data Space: 134.155.108.49:8890

Variables can be used to store numbers and strings, and later work with them. As their name suggests, they can be changed anytime, even during a Lua script. First, they have to be defined at the very start of the code. Defining them is easy: spawned=0 A variable named "spawned" has been created, and its value is currently 0. The variable later can be increased - for example, by 1 - by making them equal with themselves + 1, something like this: spawned=spawned+1 spawned=0 addhook("spawn","counter") function counter(id) spawned=spawned+1 end spawned[id]=0 --Where "id" is the player's ID.

Graph IRICount
http://dbkwik.webdatacommons.org7
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] This material is Open Knowledge Creative Commons License Valid XHTML + RDFa
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Copyright © 2009-2012 OpenLink Software