Forum

> > CS2D > Scripts > What wrong with hooks ?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch What wrong with hooks ?

16 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt What wrong with hooks ?

Kirito2K
User Off Offline

Zitieren
Hi us .
I'm editing my script and i was want to add some things and i hade some problems

Problems :
1-Something wrong in admin menu :LUA ERROR: sys/lua/admin-mod.lua:1063: attempt to concatenate field '?' (a nil value)

Thats it ..

The code: http://pastebin.com/PXEDzF17

Admin/Mod Kommentar

Added pastebin link /useigor

alt Re: What wrong with hooks ?

Rainoth
Moderator Off Offline

Zitieren
Lets see.

You're not using code and more tags.
You're not using loops.
Your code doesn't have enough ENDs.
Your code is not tabbed.

Whoever helps you must be insane

alt Re: What wrong with hooks ?

Crabby
User Off Offline

Zitieren
Hmm... you made OVER 1500 lines of useless code.

1
print('©255255000Script loaded succesfully!')print('©255255000Hooks and Functions Initialising...')
Is this your problem?
1× editiert, zuletzt 25.04.14 18:44:39

alt Seal of approval

KimKat
GAME BANNED Off Offline

Zitieren
user mafia_man hat geschrieben
Lua script of the century
Yea it even wastes hard disk space because you don't even really need it. A great job by this scripter really. It truly is the Lua script of the century. √

The hooks are wrong because you didn't use your scythe properly though.

alt Re: What wrong with hooks ?

VADemon
User Off Offline

Zitieren
1
2
3
elseif b==9 then
menu(id,"Admin menu 3,God mode|"..godMode[id]..",Admin color chat|"..admin_color_name[color_admin[id]]..",Name mode|"..nameMode[id]..",Admin menu,Admin menu 2")
end
^ Check this line if all of the tables and their keys really exist

Do you even know what "your" code does anyway?
Mehr >

alt Re: What wrong with hooks ?

Dousea
User Off Offline

Zitieren
Useless thousands lines (2500+), it is so inefficient. Also nothing wrong with your hooks. It seems nameMode[id] returning no value when you call it at line 1063:
menu(id,"Admin menu 3,God mode|"..godMode[id]..",Admin color chat|"..admin_color_name[color_admin[id]]..",Name mode|"..nameMode[id]..",Admin menu,Admin menu 2")

It looks like after you create nameMode table at line 35, you didn't change the value after player joins like godMode does. Your code at line 1074 and 1077 wrong because of this mistake. nameMode containing no value and you want to compare it with number while it is nil.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht