SA-MP Forums Archive
array not indexed - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: array not indexed (/showthread.php?tid=102273)



array not indexed - thuron - 14.10.2009

look, i have this, but it sais that the array is not indexed. what should i do?

Код:
new Currentval[256];
new Newval[256];
Код:
Currentval = dini_Get("file", "Value");
Newval = (Currentval + 700);



Re: array not indexed - dice7 - 14.10.2009

Use dini_Int to set an integer and dini_IntSet to get the integer from a file


Re: array not indexed - thuron - 14.10.2009

its still whining about the arrays that are not indexed. and i got this error:

Код:
error 017: undefined symbol "dini_IntGet"
on this line
Код:
Current = dini_IntGet("file", "Value");



Re: array not indexed - dice7 - 14.10.2009

declare integers, not arrays


Re: array not indexed - thuron - 14.10.2009

Quote:
Originally Posted by dice7
declare integers, not arrays
sorry, but i do not quite know what you mean



Re: array not indexed - Jefff - 14.10.2009

Quote:
Originally Posted by thuron
look, i have this, but it sais that the array is not indexed. what should i do?

Код:
new Currentval[256];
new Newval[256];
Код:
Currentval = dini_Get("file", "Value");
Newval = (Currentval + 700);
Код:
new Currentval;
new Newval;
Код:
Currentval = dini_Int("file", "Value");
Newval = (Currentval + 700);
but I think should be file not "file"


Re: array not indexed - thuron - 14.10.2009

ok, almost got it, thanks by jefff. last thing is the error

Код:
error 017: undefined symbol "dini_IntGet"
on this line:
Код:
CurrentVal = dini_IntGet("file", "val");
got dini included. what to do?


Re: array not indexed - Jefff - 14.10.2009

Its dini_Int not IntGet


Re: array not indexed - thuron - 15.10.2009

heh, thank you, no errors now. but i got this under my errors. i remember that i had that once before but i forgot what to do about it:

Код:
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:      3176 bytes
Code size:      77528 bytes
Data size:     4465476 bytes
Stack/heap size:   16384 bytes; estimated max. usage=4648 cells (18592 bytes)
Total requirements: 4562564 bytes

7 Warnings.