Forum

> > CS2D > Scripts > Map vote lua error?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Map vote lua error?

17 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Map vote lua error?

Kirito2K
User Off Offline

Zitieren
Hi folks,
I have a problem in my script's server.
When a player votes for a map , a hud shows with count down to 0 then map should change but instead it start counting -1 -2 -3 -4 ..
And none can enter the server..

I hope u can get solution for the script.
Script >


PS : I use hc admin script edited .

alt Re: Map vote lua error?

Rainoth
Moderator Off Offline

Zitieren
You find a word "if" then you click the button "Tab" before it. You find ANOTHER "if" after it, you click button "Tab" twice before it.
1
2
3
4
5
6
7
if then
	if then
		if then
			command
		end
	end
end

alt Re: Map vote lua error?

Rainoth
Moderator Off Offline

Zitieren
It's one of the things you do if you want others to help you.
Technically, I could just write the whole script in one line. Do you think that would be okay? Same thing here. Tab your code, it makes it a lot more readable. In some cases you may even find the reason for the error (missing 'end' and so on)

Just do it.

alt Re: Map vote lua error?

Nekomata
User Off Offline

Zitieren
It's importance because your code is more clean and understandable. For example if you've got 5 ifs within another if; other developers won't be looking hard to find the 'end' of it (get da pun?) because it'll be tabbed and vertically below it.

alt Re: Map vote lua error?

Bowlinghead
User Off Offline

Zitieren
Helping doesnt mean we do all the work for you.
For the most part your code is TABbed already.

Everything with an "end" (function, if, for, ...) is a block. And everything in that block gets an TAB. You use TAB in almost every computer language.
Line 210 - 237:
Ugly >

Fancy >
1× editiert, zuletzt 24.05.15 18:29:10

alt Re: Map vote lua error?

Kirito2K
User Off Offline

Zitieren
@user Danilwra: I didn't steal it , ur just dump i said that i use it in my server and i have a error

@user Bowlinghead: Ok so i understand the reason of using tabbing , after tabbing what i could do ?

Script with tabbing >
3× editiert, zuletzt 26.05.15 17:00:12

alt Re: Map vote lua error?

XoOt
Super User Off Offline

Zitieren
@user Danilwra: thats not correct.
Not everyone is able to solve selfmade mistakes, therefore he did the only right task to ask for help. He will learn and improve by time so dont expect too much.

alt Re: Map vote lua error?

Bowlinghead
User Off Offline

Zitieren
I don´t want to look through these 300 lines of code without a single commant.

Between line 184 and 185 type this:
1
voteend = 0
Maybe it will fix it; maybe not.

Btw:
You used a [ / quote] at the end of your post. So your code isn´t displayed as code and you didn´t tabbed it as well (you just copy& pasted my example...)
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht