Help With Arrays
#1

I'm trying set the vars of an array with a function but its not working, i just get errors, anyone know you this is done?

Ex:

pawn Code:
new myArray[] = { 200, 300, 400 };

myFunction(p)
{
  myArray[] = { p*100, p*200, p*300 };
  return 1;
}

//so if i do:
myFunction(10)
myArray would equal {1000, 2000, 3000}
Thanks for any help
Reply
#2

Yes, i figured that out like 10 minutes after i posted this, but thanks for replying. I just ran a loop for the size of the array on the index of each variable inside the array.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)