Forum

> > CS2D > Scripts > My wrong spawn hook
Forums overviewCS2D overview Scripts overviewLog in to reply

English My wrong spawn hook

7 replies
To the start Previous 1 Next To the start

old My wrong spawn hook

Eternal
User Off Offline

Quote
Hey! guys i have a question
why my spawn hook didn't work
1
2
3
4
5
6
7
8
--SPAWN

addhook("spawn","zcspawn")
function zcspawn(id)
	parse('hudtxt2 '..id..' 5 "ฉ000255000Zcash: '..zc2[id]..'" 10 110 0')
	parse('hudtxt2 '..id..' 6 "ฉ000255000Zcoin: '..zc1[id]..'" 10 130 0')
	end
end

this is my hook and fuction,the hudtext didn't appear when spawn please answer me,where is wrong?

Thank you for useful answer

old Re: My wrong spawn hook

Cure Pikachu
User Off Offline

Quote
One extra end, and what the hell is the ฉ sign for? You shouldn't confuse it with the copyright sign (©), for text colouring, that is.

old Re: My wrong spawn hook

Eternal
User Off Offline

Quote
i delete second end but it didn't work too
in console it show
LUA ERROR: sys/lua/zc.lua:411: 'end' expected (to close 'fuction' at line 30) near '<eof>'
oh! and when i use second end,when i kill bot it show hudtext confusion so much
hey! do you want to see my script

user Cure Pikachu has written
One extra end, and what the hell is the ฉ sign for? You shouldn't confuse it with the copyright sign (©), for text colouring, that is.

OH! Sorry i am thai people my Notepad in my computer
will show ฉ (©)

old Re: My wrong spawn hook

Cure Pikachu
User Off Offline

Quote
@user Eternal: Oh, no wonder.
More >

By the way, is that part of the whole script? If so, show us the entire spawn hook function (or in worse cases, the entire script).

old Re: My wrong spawn hook

Cure Pikachu
User Off Offline

Quote
You missed out an end for the dmenu function. After adding an end there, just remove the extra end in the zcspawn function.

old Re: My wrong spawn hook

Eternal
User Off Offline

Quote
YEY!! it work thank you very much
oh i missed by myself
THANK YOU VERY MUCH
and sorry for my bad english
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview