Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Concatenating two lists - what am I doing wrong?

Diego Pannotia
Laronzo Fitzgerald
Join date: 14 Nov 2006
Posts: 37
04-02-2007 15:03
Heya, following on from my last post I have two lists but want to concatenate them into one - this doesn't seem to compile and returns a syntax error... (the lists compile correctly on their own)

CODE

list normal = [" ","","0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m",
"n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K",
"L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];

list special = ["!", "\"", "$", "%", "^", "&", "*", "(", ")", "-", "_", "+", "=", "{", "}", "[", "]", ":", ";", "'",
"@", "#", "~", "<", ">", ",", ".", "?", "/", "\\", "|"];

list chars = normal + special; // syntax error just before +


Thanks ever so much again guys,

Mark.
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
04-02-2007 15:26
You can't perform operations in a global declaration-and-assignment, you can only assign literal values. (i.e., you can't do integer Num = 2 + 2; as a global, either, though you can do integer Num = 4;

Do the concatenation inside default state_entry.
Diego Pannotia
Laronzo Fitzgerald
Join date: 14 Nov 2006
Posts: 37
04-02-2007 16:35
Ahh I seee! Fantastic, thanks very much =D