Tomahawk Posted July 21, 2018 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 28 Reputation: 7 Joined: 07/17/18 Last Seen: Yesterday at 05:02 AM Share Posted July 21, 2018 Hello everyone! I am currently working on a new script and decided to test the Countinarray and Inarray commands. But for some reason, I get an error when I reach the part where it reads the countinarray command: Line: if (countinarray(.grbbid[0],getcharid(2)) == 1 && .grbbday[inarray(.grbbid,getcharid(2))] < 40){ Error in console: [Warning]: Unexpected type for argument 2. Expected variable, got C_INT. [Debug]: Data: number value=1 [Debug]: Function: countinarray [Debug]: Source (NPC): Guild Manager at prontera (168,180) [Error]: buildin_countinarray: not a variable [Debug]: Data: variable name='.grbbid' index=0 [Debug]: Data: number value=1 [Debug]: Source (NPC): Guild Manager at prontera (168,180) I downloaded rAthena from github yesterday and just compiled it with no errors. Does anyone now what could it be? Quote Link to comment Share on other sites More sharing options...
0 sader1992 Posted July 21, 2018 Group: Content Moderator Topic Count: 55 Topics Per Day: 0.01 Content Count: 1691 Reputation: 716 Joined: 12/21/14 Last Seen: Tuesday at 07:50 PM Share Posted July 21, 2018 (edited) countinarray accept 2 variables [or arrays] if you want to use this code do this .@acc_id = getcharid(2); if (countinarray(.grbbid[0],.@acc_id) == 1 && .grbbday[inarray(.grbbid,getcharid(2))] < 40){ Edited July 21, 2018 by sader1992 1 Quote Link to comment Share on other sites More sharing options...
0 nitrous Posted July 21, 2018 Group: Developer Topic Count: 4 Topics Per Day: 0.00 Content Count: 141 Reputation: 46 Joined: 08/14/12 Last Seen: April 5 Share Posted July 21, 2018 Interesting, the error makes it seem like you need a variable. Try doing something like .@cid = getcharid(2); if (countinarray(.grbbid[0],.@cid) == 1 && .grbbday[inarray(.grbbid,.@cid)] < 40){ 1 Quote Link to comment Share on other sites More sharing options...
0 Tomahawk Posted July 21, 2018 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 28 Reputation: 7 Joined: 07/17/18 Last Seen: Yesterday at 05:02 AM Author Share Posted July 21, 2018 Thank you very much, solved! Quote Link to comment Share on other sites More sharing options...
Question
Tomahawk
Hello everyone!
I am currently working on a new script and decided to test the Countinarray and Inarray commands.
But for some reason, I get an error when I reach the part where it reads the countinarray command:
Line:
if (countinarray(.grbbid[0],getcharid(2)) == 1 && .grbbday[inarray(.grbbid,getcharid(2))] < 40){
Error in console:
[Warning]: Unexpected type for argument 2. Expected variable, got C_INT. [Debug]: Data: number value=1 [Debug]: Function: countinarray [Debug]: Source (NPC): Guild Manager at prontera (168,180) [Error]: buildin_countinarray: not a variable [Debug]: Data: variable name='.grbbid' index=0 [Debug]: Data: number value=1 [Debug]: Source (NPC): Guild Manager at prontera (168,180)
I downloaded rAthena from github yesterday and just compiled it with no errors.
Does anyone now what could it be?
Link to comment
Share on other sites
3 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.