Forum

> > CS2D > Scripts > Wrong script
Forums overviewCS2D overview Scripts overviewLog in to reply

English Wrong script

24 replies
Page
To the start Previous 1 2 Next To the start

old Re: Wrong script

QuakeR
BANNED Off Offline

Quote
@user Rainoth: Beacause your script you've made dosen't work
always this come
1
LUA ERROR : attempt to call nil value

old Re: Wrong script

Rainoth
Moderator Off Offline

Quote
Just tested it and it works perfectly, user QuakeR
You'd get that error when you call a function with addhook but the function doesn't actually exist.

For example if you made
1
2
3
addhook("say","SAY_HOOK")
but the function was called
[code]function _say(id,text)

TL;DR it works well if you fix the quote error that user Waldin pointed out.

old Re: Wrong script

QuakeR
BANNED Off Offline

Quote
@user Rainoth: Ah , ok thank you then about that
Your mean it already called then the write this :
LUA ERROR : attempt to call nil value

old Re: Wrong script

Rainoth
Moderator Off Offline

Quote
Yes, that's what happens.
The addhook tells the computer to call x function but it doesn't exist so computer is confused and throws out an error.

For more detailed explanation on lua errors refer to thread cs2d [GUIDE] Lua errors meanings
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview