Forum

> > CS2D > Scripts > [request]need edit code
Forums overviewCS2D overview Scripts overviewLog in to reply

English [request]need edit code

16 replies
To the start Previous 1 Next To the start

old [request]need edit code

super123s
User Off Offline

Quote
hey guys i have this code in admin.lua
Spoiler >

i want to free/arrest for only admin level 2 , 3 so i change it to
Spoiler >

and i get error
1
LUA ERROR:sys/lua/admin.lua:182'end' expected{to close 'function' at line 31.
so i need some help to edit this script
edited 1×, last 25.07.11 03:47:30 am

old Re: [request]need edit code

super123s
User Off Offline

Quote
i don't know what you say about tab my code?
i'm a newbie i not read tutorial so i don't know what is tab your code
please help me/give me code

here take some cookie : 3cookie

can you explane for me:how to tab code ?

and i want learn tutorial to making lua mod

old don't know

super123s
User Off Offline

Quote
don't kidding me .men
the tutorial is very bigggggggggg.very much english word
and my english is bad so forget .I never read this tutorial
tutorial >>>>me>>>>> [very hard to study]
let help me edit it

old Re: [request]need edit code

super123s
User Off Offline

Quote
huy guys let help me
don't answer my question>>>>>
i want you help me to edit this code and fix error not this
please help me

old Re: [request]need edit code

archmage
User Off Offline

Quote
Try this. If it does not work tab your code
More >

old Re: [request]need edit code

Apache uwu
User Off Offline

Quote
@Dark Byte you have to understand that they have no knowledge of lua, they just stole these scripts and at their state is was not working.

old Re: [request]need edit code

Lee
Moderator Off Offline

Quote
find all occurrences of this word: function

1
2
3
4
5
6
7
8
9
10
11
12
function xxxxxxx1(...)
code
code
...
end
...
function xxxxxxx1(...)
code
code
...
end
...

and change it to

1
2
3
4
5
6
7
8
9
10
11
function xxxxxxx1(...)
	code
	code
	...
end
...
function xxxxxxx2(...)
	code
	code
	...
end

and then find all occurrences of

1
2
3
4
5
6
if blah blah then
code
code
...
end
...

with
1
2
3
4
5
6
if blah blah then
	code
	code
	...
end
...

and

1
2
3
4
5
6
7
8
if blah blah then
code
...
if blah blah 2 then
more code
end
...
end

with

1
2
3
4
5
6
7
8
if blah blah then
	code
	...
	if blah blah 2 then
		more code
	end
	...
end

and do the same for these kinds of patterns as well.

1
2
3
for ... do
...
end

It's essential that you do this correctly, else you will get errors such as

1
LUA ERROR:*.lua:n 'end' expected to close 'function' at line n.

old Re: [request]need edit code

Apache uwu
User Off Offline

Quote
You will get errors because you are not organized with your tabbing. Not because of the tabbing.

You can even put your lua on 1 single line and lua wouldn't even care...however once you have tabbed your code it's much easier to spot somewhere you might have missed an end or misplaced an end.

old Re: [request]need edit code

super123s
User Off Offline

Quote
hey dark byte your code >>>>
1
LUA ERROR: sys/lua/Admin.lua:183: 'end' expected (to close 'function' at line 28) near '<eof>'
some body help me please

old Re: [request]need edit code

super123s
User Off Offline

Quote
oh cmonnnnnnnnnnnnnnnnn
let help me don't stay in this topic to >>>>
ok!
help me ! post the code

HERE take it if you want>>>>>>>> cookie
edited 1×, last 25.07.11 06:07:45 am
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview