Jump to content
  • 0

Getting error


Question

Posted

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

4 answers to this question

Recommended Posts

Posted (edited)

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...