Forum

> > CS2D > Scripts > What wrong with hooks ?
Forums overviewCS2D overview Scripts overviewLog in to reply

English What wrong with hooks ?

16 replies
To the start Previous 1 Next To the start

old What wrong with hooks ?

Kirito2K
User Off Offline

Quote
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 comment

Added pastebin link /useigor

old Re: What wrong with hooks ?

Rainoth
Moderator Off Offline

Quote
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

old Re: What wrong with hooks ?

Crabby
User Off Offline

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

1
print('©255255000Script loaded succesfully!')print('©255255000Hooks and Functions Initialising...')
Is this your problem?
edited 1×, last 25.04.14 06:44:39 pm

old Seal of approval

KimKat
GAME BANNED Off Offline

Quote
user mafia_man has written
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.

old Re: What wrong with hooks ?

VADemon
User Off Offline

Quote
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?
More >

old Re: What wrong with hooks ?

Dousea
User Off Offline

Quote
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.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview