i see in strider.lua from starkkz
how to use [Str]?
Strider[str].x = Strider[str].x + math.sin(angle) * 18
Strider[str].y = Strider[str].y - math.cos(angle) * 18
and :
Need array ?
local ? some things? !
help! Admin/mod comment
"help lua" = retarded title. fixed. tables are variables that can hold more than 1 value at time.(they are nearly the same as arrays)
strider is a table so "str" is the index number for example:
example = {}
example[1] = 5 -- "1" is the indexnumber.
or
example = {}
local str = 4 -- i give the variable "str" the value "4".
example[str] = 20 --the 4th place of the variable is given the value "20"
print (example[str]) -- this will put in the console a message out that displays "20". (the 4th place of the table) edited 1×, last 08.03.11 02:34:59 pm
Lol. Actually lmfao!
Strider is an array and you are trying to access it with the variable 'str'. If str equals "lol", then it would be the same as:
Learn some programming basics. Srsly. STR is a value for count.
1
2
3
4
for str = count_from_start, count_to_end do
	-- This block will be called (count_to_end-count_from_start) Times.
	-- And the str value will be set to the current count
end -- end our count
I used that to call each strider in game ok thanks
i need help more :
closest = random players near strider
example : local hpdmg = 10
local closest = nil
parse("sethealth "..closest[1].." "..player(closest[1],"health")-hpdmg) You know, you can't call a table item if the table's value is nil. you can, but this will cause errors
But as EngiN33R said: you have to define the table "closest" and give it a value. hey i read strider.lua
but not see to call a value !
help me to write script
and how to define the table "closest" To define a table called closest do this:
To give a table a value,
Thus,
1
2
closest[1]=="foo"
closest[2]=="bar"
And that's all. But it won't work for that script.
Look, if you don't understand what 'call a value' or 'table' means - you shouldn't edit complicated (for you) scripts like Starkkz's. First learn, then edit.