|
STRING* arrays
#178712
01/19/08 11:51
01/19/08 11:51
|
Joined: Oct 2007
Posts: 5,211 İstanbul, Turkey
Quad
OP
Senior Expert
|
OP
Senior Expert
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
|
i want to declare a string array to use with half-life console-like thingy.
STRING* console_strs[20] = {"#60","#60","#60","#60","#60","#60","#60","#60","#60","#60","#60","#60","#60","#60","#60","#60","#60","#60","#60","#60"};
didnt work.
any ideas?
3333333333
|
|
|
Re: STRING* arrays
[Re: Quad]
#178713
01/20/08 00:16
01/20/08 00:16
|
Joined: Dec 2006
Posts: 78 Nevada, USA
Futurulus
Junior Member
|
Junior Member
Joined: Dec 2006
Posts: 78
Nevada, USA
|
You could make a loop in a startup function that fills your array. Code:
STRING* console_strs[20]; function fillstrs_startup() { var s; for(s = 0; s < 20; s++) console_strs[s] = str_create("#60"); }
You wouldn't be able to use console_strs in other startup functions, though. How, exactly, didn't it work? Did you get an error, or did the strings show up empty somewhere in the script?
|
|
|
|