String Array?
Hey,
i need an string array, but its not working :/ Code:
new String:argsarr[3][] = {player, msg, motdTitle} |
Re: String Array?
First, arrays may only be initialized with constant values. Also, you must specifiy the last dimension's size. Something like this would work fine:
PHP Code:
|
Re: String Array?
Quote:
You can do: Code:
|
Re: String Array?
Is the same with letters?
PHP Code:
|
Re: String Array?
yes
|
Re: String Array?
Sure. You can write all what you want into a string. ^^
|
Re: String Array?
Quote:
|
Re: String Array?
i get
erro 008: must be a constant expression; assumend zero with new argsarr[][] = {player, msg, motdTitle} |
Re: String Array?
Quote:
1-)Literal strings 2-)Defines 3-)const variables |
Re: String Array?
I also tried that, but then i also get errors:
amxbans/cmdBan.inl(564) : error 029: invalid expression, assumed zero amxbans/cmdBan.inl(564) : warning 215: expression has no effect amxbans/cmdBan.inl(564) : error 001: expected token: ";", but found "const" amxbans/cmdBan.inl(564) : error 001: expected token: "=", but found "[" amxbans/cmdBan.inl(564) : fatal error 107: too many error messages on one line stock const argsarr[][] = {player, msg, motdTitle} |
| All times are GMT -4. The time now is 05:32. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.