Forum

> > CS2D > Scripts > [request]need edit code
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch [request]need edit code

16 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt [request]need edit code

super123s
User Off Offline

Zitieren
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
1× editiert, zuletzt 25.07.11 03:47:30

alt Re: [request]need edit code

super123s
User Off Offline

Zitieren
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

alt don't know

super123s
User Off Offline

Zitieren
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

alt Re: [request]need edit code

super123s
User Off Offline

Zitieren
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

alt Re: [request]need edit code

archmage
User Off Offline

Zitieren
Try this. If it does not work tab your code
Mehr >

alt Re: [request]need edit code

Apache uwu
User Off Offline

Zitieren
@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.

alt Re: [request]need edit code

Lee
Moderator Off Offline

Zitieren
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.

alt Re: [request]need edit code

Apache uwu
User Off Offline

Zitieren
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.

alt Re: [request]need edit code

super123s
User Off Offline

Zitieren
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

alt Re: [request]need edit code

super123s
User Off Offline

Zitieren
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
1× editiert, zuletzt 25.07.11 06:07:45
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht