Hi, Im trying to send an array using callfunc but I only got the first value. I tried several ways like
- using functions inside same npc
- getting the array value from inside the function with getvariableofnpc
my example:
OnInit:
setarray .items[0],1,2,3,4,5;...
callfunc("MyFunction",.items);...
function script MyFunction{
setarray .@itemsTemp, getarg(0);for(.@i=0;.@i< getarraysize(.@itemsTemp);.@i++){
mes "Item: "+.@itemsTemp[.@i];}return;}...Output:Item:1
forcing "for" with a fixed number will Output:Item:1Item: null
Item: null
Item: null
It is possible? Or should I rethink my NPC behaviour? THanks
Question
RagnaDev
Hi, Im trying to send an array using callfunc but I only got the first value. I tried several ways like
- using functions inside same npc
- getting the array value from inside the function with getvariableofnpc
my example:
It is possible? Or should I rethink my NPC behaviour? THanks
Edited by Kota2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.