Looks like he wants to set an alias to store what the knife crosshairsize would be when knife is selected. Don't worry, Verse, you merely forgot to use the equals sign to define the alias in the menu. Happens to me all the time.
Also remember that you're wanting to set the crosshairsize in that later alias, so use the command "crosshairsize" and have the variable as its argument.
Now when setCrosshair is executed, it will detect if the knife is the current weapon and, if so, change the crosshairsize to the variable defined in the menu, then use the command "Setting_Knife_Type" to save an alias called "crosshairType" containing "x-dot.png".
(and on a personal note, IMO having "1" as the step value would make it tedious to get from one end of the crosshairsize spectrum to the other.)
Also remember that you're wanting to set the crosshairsize in that later alias, so use the command "crosshairsize" and have the variable as its argument.
[SELECT ALL] Code:
...
newmenu "Knife"
menuitemslider [Crosshair size: ] 0 50 [] 1 [] [Setting_Knife_Size = $arg1] // Here is where the variable is set, use "=" or "alias"
menuitem "close" [closemenu "Knife"]
Setting_Knife_Type = [ alias crosshairType x-dot.png]
alias setCrosshair [
//size
// alias size = 15 Commented out since it's orphaned now (as far as I can tell, perhaps it'll be used later?)
// alias crosshairType = 0 Commented out because we're just about to define this via the command-style alias
//knife 0
if (= 0 (curweapon)) [
crosshairsize $Setting_Knife_Size // Now we're telling crosshairsize to accept our variable
Setting_Knife_Type
] [
...
(and on a personal note, IMO having "1" as the step value would make it tedious to get from one end of the crosshairsize spectrum to the other.)