Forum

> > CS2D > Scripts > Hudtxt not working
Forums overviewCS2D overview Scripts overviewLog in to reply

English Hudtxt not working

5 replies
To the start Previous 1 Next To the start

old Hudtxt not working

Mami Tomoe
User Off Offline

Quote
Hi I got a script from someone that he made a few years ago, I attemped to fix it but I found out that the hudtxts aren't working, I tried to fix them but failed

1
2
hudtxt2(id,ar.hudids[1],"©255255255",itemtype(ar.weapons[ar.level[id]+1],"name").." ("..ar.level[id].."/"..#ar.weapons..")",635,430,2)
hudtxt(ar.hudids[3],"©"..tm[player(id,"team")].."","Lead: ("..ar.level[id]..") "..player(id,"name").."",5,110,0)

Error: No errors, it just shows on the top left of the screen and adds the pos to the text (for example Weapon: Elite 635 430 2)

Any help will be great, thanks

old Re: Hudtxt not working

VADemon
User Off Offline

Quote
1
2
3
4
5
6
7
8
-- wrapper.lua
function hudtxt(id,text,x,y,align)
	parse("hudtxt "..id.." "..text.." "..x.." "..y.." "..align)
end

function hudtxt2(player,id,text,x,y,align)
	parse("hudtxt2 "..player.." "..id.." "..text.." "..x.." "..y.." "..align)
end
1
2
3
-- your functions:
hudtxt2(id,ar.hudids[1],"©255255255",itemtype(ar.weapons[ar.level[id]+1],"name").." ("..ar.level[id].."/"..#ar.weapons..")",635,430,2)
hudtxt(ar.hudids[3],"©"..tm[player(id,"team")].."","Lead: ("..ar.level[id]..") "..player(id,"name").."",5,110,0)
Your code has 14 commas, wrapper.lua code has only 9 commas. You have too many arguments (delimeted with , ) in your function calls.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview