Forum

> > CS2D > Scripts > cs2d rp work?
Forums overviewCS2D overview Scripts overviewLog in to reply

English cs2d rp work?

8 replies
To the start Previous 1 Next To the start

old cs2d rp work?

Fuly
User Off Offline

Quote
LUA ERROR: sys/lua/rp_scripts/module/hooks.lua:337: attempt to index global 'havebal' (a
nil value)
-> sys/lua/rp_scripts/module/hooks.lua:337: in function <sys/lua/rp_scripts/module
hooks.lua:336>
-> in Lua hook 'drop', params: 1, 56, 74, 0, 0, 0, 48, 26

Spoiler >

old Re: cs2d rp work?

Starkkz
Moderator Off Offline

Quote
haveball is not defined anywhere, put this at the begining of your code.
1
haveball = {}

old Re: cs2d rp work?

Fuly
User Off Offline

Quote
@user Starkkz: work

LUA ERROR: sys/lua/rp_scripts/module/hooks.lua:337: 'then' expected near '='
-> [C]: in function 'dofile'
-> sys/lua/rp_scripts/RolePlay.lua:9: in main chunk
-> [C]: in function 'dofile'
-> sys/lua/main.lua:12: in main chunk

Spoiler >

old Re: cs2d rp work?

MikuAuahDark
User Off Offline

Quote
@user Starkkz: It should be havebal. It's not typo as far as I know in this roleplay script.

Anyway, put this somewhere in main.lua
havebal={}

old Re: cs2d rp work?

GeoB99
Moderator Off Offline

Quote
Because there is a "if" statement in that line, that's why it gives you this error, otherwise it should not. You have to remove it as it's not necessary a "if" near havebal = {}.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview