Author Topic: Question about passing array variables  (Read 98 times)

0 Members and 1 Guest are viewing this topic.

Online L@Zar0

Question about passing array variables
« on: November 21, 2024, 01:12:55 PM »
Hi,
I looked a lot of places and did some tests and I can not understand how I can access a value in an array. I talk of something in KQ5CD, trying to advance a bit more.

We have the proc762_1, which I have modified a bit, adding two variables (I don't need them, but help for making tests):



Ok, the problem is that I want to get the variable index 1 (93) and index 2 (46) of the array param1 into dX and dY variables. The original array is (local164 in this case as example):



And the calling of the procedure is:



I need to get that 93 and 46, and I thought I was accessing correctly the variables. But it is giving me problems because I didn't get the expected result. If I put in dX and dY directly 93 and 46 it works well.

What am I doing wrong?
« Last Edit: November 21, 2024, 04:11:51 PM by L@Zar0 »



Online L@Zar0

Re: Question about passing array variables
« Reply #1 on: November 21, 2024, 04:32:03 PM »
Ok, I will answer myself. I finally found that I must use WordAt to get the value of the index in an array.


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.052 seconds with 23 queries.