Author Topic: [SOLVED] Vstrings? Problem getting it to work...  (Read 2512 times)

Mr. Phawks

  • Posts: 43
  • Turrets: +1/-7
[SOLVED] Vstrings? Problem getting it to work...
« on: October 24, 2007, 10:22:00 pm »
A modified example of my current code;

Code: [Select]
bind o "vstr example"
set example1 "say Example 1;set example vstr example2"
set example2 "say Example 2;set example vstr example3"
set example3 "say Example 3;set example vstr example4"
set example4 "say Example 4;set example vstr example5"
set example5 "say Example 5;set example vstr example1"


When I try to send this, I just get a dead O key. No error messages, no console messages, just a dead key. What did I do wrong here?

IJsje

  • Posts: 58
  • Turrets: +1/-1
[SOLVED] Vstrings? Problem getting it to work...
« Reply #1 on: October 24, 2007, 10:37:27 pm »
what is 'example' when you press o?

Survivor

  • Posts: 1660
  • Turrets: +164/-159
[SOLVED] Vstrings? Problem getting it to work...
« Reply #2 on: October 24, 2007, 11:14:21 pm »
try starting with bind o "vstr example1"

Edit: wait, there's something fundamentally wrong with that bind.
Edit 2: No seems right. but you don't have the right starting vstr
I’m busy. I’ll ignore you later.

Mr. Phawks

  • Posts: 43
  • Turrets: +1/-7
[SOLVED] Vstrings? Problem getting it to work...
« Reply #3 on: October 24, 2007, 11:59:32 pm »
I fixed it now. The syntax has been changed to this:

Code: [Select]
bind o "vstr example1"
set example1 "say Example 1;set example1 vstr example2"
set example2 "say Example 2;set example1 vstr example3"
set example3 "say Example 3;set example1 vstr example4"
set example4 "say Example 4;set example1 vstr example5"
[b]set example5 "say Example 5;set example1 vstr example1"[/b]


Which works fine until I get to saying "Example 5"; I press the key and get something about a text overflow error or somesuch. I'll edit this and post the exact error message momentarily. So, the emboldened section of the new code has something wrong. What is it? The "set example1 vstr example1" is most definitely the culprit, but how should I go about fixing it?

EDIT:

The error is "Cbuf_InsertText overflow," whatever that means. Any help?

EDIT 2:

Found the problem. A guide by Rawr solved it. Apparently, the "set example1 vstr example1" should simply be "bind o vstr example1."  I'll check it in-game to make sure it works.