Jump to content
  • 0

Getting error


patr3k

Question


  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.02
  • Content Count:  257
  • Reputation:   7
  • Joined:  03/12/12
  • Last Seen:  

Getting error with this script.


prontera,156,156,3 script Sayer 90,{

 // Reward Array <Item Id>, <Qty>, <Refine>
 // Set refine option to 0 if non-refinable.
 setarray .@rwd[0],2357,1,7,2524,1,7,2421,1,7,2115,1,7,13607,3,0,14208,3,0,12103,10,0,674,10,0,4140,4,0;

 query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`=" + getcharid(3) + "", .@lip$);

 if ( getd("$" + .@lip$ + "_NG") > 0 || #NewbieGift > 0)
 {
mes "[sayer]";
mes "I'm sorry, the rewards are exclusively for new players.";
close;
 }

 mes "[sayer]";
 mes "Welcome! Here are some free gifts";
 mes "for newcomers:";

 // List all the items.
 for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 3 )
// Check if refined option is not 0.
if(.@rwd[.@i+2] != 0) {
 mes .@rwd[.@i+1] + " x +" + .@rwd[.@i+2] + " " + getitemname(.@rwd[.@i]);
}else{
 mes .@rwd[.@i+1] + " x " + getitemname(.@rwd[.@i]);
 }

 close2;

 // Get Items
 for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 3 )
// Check if refined option is not 0.
if(.@rwd[.@i+2] != 0) {
     // getitem2 <id>, <qty>, <identify>, <refine>, <attribute>, <card1>, <card2>, <card3>, <card4>
     getitem2 .@rwd[.@i], .@rwd[.@i+1], 1, .@rwd[.@i+2], 0, 0, 0, 0, 0;
}else{
 getitem .@rwd[.@i], .@rwd[.@i+1];
}

 // Set variable to make sure player can't get items again.
 set #NewbieGift, 1;
 setd "$" + .@lip$ + "_NG", getd("$" + .@lip$ + "_NG") + 1;

 end;

 OnInit:
waitingroom "Newbie Package!",0;
end;
}

error-1.jpg

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

how to reproduce this error ? o.o

my test server runs fine with this script

using rathena ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  205
  • Reputation:   19
  • Joined:  10/12/12
  • Last Seen:  

Are you using an SQL emulator? xD

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.02
  • Content Count:  257
  • Reputation:   7
  • Joined:  03/12/12
  • Last Seen:  

how to reproduce this error ? o.o

my test server runs fine with this script

try to click the npc newbie giver

Are you using an SQL emulator? xD

No, i'm not.

Edited by patr3k
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  205
  • Reputation:   19
  • Joined:  10/12/12
  • Last Seen:  

Then you can't run any sql commands. lol.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...