Is it possible? String by count .. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Is it possible? String by count .. (
/showthread.php?tid=343599)
Is it possible? String by count .. -
tal_peretz - 18.05.2012
That what I did -
PHP код:
new Count;
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && i != playerid && !battle[i][InBattle] && GetPlayerMoneyEX(i) >= battle[playerid][MoneyBattle])
Count++;
new stringBig[Count*80];
Erros -
PHP код:
error 008: must be a constant expression; assumed zero
error 009: invalid array size (negative, zero or out of bounds)
error 036: empty statement
fatal error 107: too many error messages on one line
On line -
PHP код:
new stringBig[Count*80];
Thanks
Re: Is it possible? String by count .. -
Niko_boy - 18.05.2012
No thats not possible.
Re: Is it possible? String by count .. -
tal_peretz - 18.05.2012
Quote:
Originally Posted by Niko_boy
No thats not possible.
|
So.. how can I know how sizeof to set ? Can you know other way to do it ?
Re: Is it possible? String by count .. -
Vince - 18.05.2012
It is not possible. Sizes of arrays must be known at compile time. Even if it would work, you could end up with a 40,000 cell string which would probably crash the server.