Forum

> > CS2D > Scripts > Declare text in a menu
Forums overviewCS2D overview Scripts overviewLog in to reply

English Declare text in a menu

1 reply
To the start Previous 1 Next To the start

old Declare text in a menu

Alistaire
User Off Offline

Quote
How to declare new text (options) in a menu? I've tried;

1
2
3
4
5
6
7
C1 = "Cavalry|Horse"

(menu shit etc)

function MM.classes.classmenu(id)
     menu(id,"Medieval Mod classes@b,Random,"+C1)
end

But it doesn't work for some reason.

Log files has written
[22:12:19] LUA ERROR: sys/lua/medieval mod.lua:59: attempt to perform arithmetic on a string value

old Re: Declare text in a menu

Bowlinghead
User Off Offline

Quote
1
2
3
4
5
c1 = "lol|rofl"
-- untestet
function yourmenu(id)
	menu(id,"Hello,button,button,button,"..c1)
end

and for more:

1
2
3
4
5
6
c1 = "lol|rofl"
c2 = "lol2|rofl"
-- untestet
function yourmenu(id)
	menu(id,"Hello,button,button,button,"..c1..","..c2)
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview