Directly add values to a 2 dimensional array ?
#3

Quote:
Originally Posted by LarzI
Посмотреть сообщение
The last piece of code doesn't assign anything. It's just an expression. You'll need to use += for your purpose
pawn Код:
drugs[ playerid ][ plantgrams ] += 5;
Thanks LarzI You know, i was just trying to play around with arrays, and i found out that it didn't compile, and i found out that arrays does not work like variables

@******:

I was not sure either about what it would do, as it didn't compile. I was just trying to add 5 into the value it was holding. So, i suppose that LarzI's Comment was correct, and that it works somehow better now


Thanks anyways! ^^
Reply


Messages In This Thread
Directly add values to a 2 dimensional array ? - by denNorske - 13.02.2013, 10:23
Re: Directly add values to a 2 dimensional array ? - by LarzI - 13.02.2013, 10:42
Re: Directly add values to a 2 dimensional array ? - by denNorske - 13.02.2013, 11:03

Forum Jump:


Users browsing this thread: 1 Guest(s)