Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Pawn] 3d iterator array

 
  • 0 Vote(s) - 0 Average
Pawn 3d iterator array
K.a.r.o.l
Offline

Burgershot Member
Posts: 1
Threads: 1
Joined: May 2021
Reputation: 0
Location: Grove Street
#1
2021-05-18, 11:35 AM (This post was last modified: 2021-05-18, 11:38 AM by K.a.r.o.l.)
Hi i have the latest version of ysi 5.05.0301 but i have a problem with 3d iterator array.


Code:
new
Iterator:Iter3[5][8]<10>;
for (new i = 0; i != Iter_InternalSize(Iter3); ++i)
{
Iter_Init(Iter3[i]);
}
Iter_Add(Iter3[3][6], 7);



Errors:


error 017: undefined symbol "Iter_InternalSize"
error 028: invalid subscript (not an array or too many subscripts): "[email protected]"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line


i also tried this


Code:
#define SIZE 5
new
Iterator:Iter3[SIZE][8]<10>;
for (new i = 0; i != SIZE; ++i)
{
Iter_Init(Iter3[i]);
}
Iter_Add(Iter3[3][6], 7);


and this


Code:
for (new i = 0; i != Iter_InternalSize(Iter3); ++i)
{
Iter_InitInternal(Iter_InternalArray(Iter3[i]), Iter_InternalSize(Iter3[]), Iter_InternalSize(Iter3[][]) - 1);
}


but its doesnt work

Pls help
Y_Less
Offline

Administrator

Posts: 323
Threads: 16
Joined: Feb 2019
Reputation: 90
#2
2021-05-18, 12:05 PM
1. Don't use functions with "Internal" in their name - they are internal to the library.

2. I've never tested with 3d arrays, pawn doesn't really do 3d arrays and I'd be amazed if it worked at all. Honestly, you really shouldn't even need a 3d array ever.
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode