Quote:
Originally Posted by Dragonshadow
I've already read the entire scripting section of the wiki. The only thing that even comes remotely close to it is
http://wiki.alliedmods.net/KeyValues...erative_Lookup
Though I have figured out its going to need to be like this instead:
PHP Code:
Pwnt { "phrases" { "lol" "wtf" "bbq" "h4x" } "amount" { "4" } } LUL { "phrases" { "zomg" "wut button is fly up" } "amount" { "2" } }
</span></span>
|
You're still missing a very key part of a keyvalues structure. If you are using keyvalues.
It is, the key. You've got lots of sections and values, but no keys. Also, your sections need to be in quotes.
Code:
"main"
{
"pwnt"
{
"phrase1" "lol"
....
"amount" "4"
}
...
}
and
Code:
"main"
{
"pwnt"
{
"phrase" "lol,wtf,..."
"amount" "4"
}
...
}
are 2 ways to make a valid keyvalue file for what you want (even though keyvalues probably isn't the best way to do what you want). The second one would require you to use ExplodeString() to get each string in the list into an array of strings.
Like I said, it's better when you read the wiki article instead of just skimming for a magic command.