Jump to content
  • 0
Sign in to follow this  
stiflerxx

Erro to update.... script npc

Question

not getting to see where I went wrong ... the emulator is giving these two error:
 
erro 1:
: Erro de banco de dados - Out of range value for column 'timer' at row 1
[Depurar]: em c:\users\usuario\desktop\trabalhos ragnarok\ragna-field\emulador\s
rc\map\script.c:15905 - UPDATE `houses` SET `timer`=`timer`-'1'
erro 2:
[Depurar]: Source (NPC): #controller_house (invisible/not on a map)
 
script:
 

 

- script #controller_house -1,{

OnInit:
bindatcmd "house", strnpcinfo(0)+"::OnHouseInfo";
initnpctimer;
end;
 
OnTimer60000:
query_sql "UPDATE `houses` SET `timer`=`timer`-'1'";
query_sql "SELECT `auto_id`, `name`, `mapname` FROM `houses` WHERE `timer`<='0' AND `status`='1'", .@auto_id, .@name$, .@mapname$;
for( set .@i, 0; .@i < getarraysize(.@auto_id); set .@i, .@i + 1 )
{
query_sql "UPDATE `houses` SET `status`='0', `master_id`='0', `timer`='0', `invitation`='0' WHERE `auto_id`='" + .@auto_id[.@i] + "'";
query_sql "DELETE FROM `houses_members` WHERE `house_id`='" + .@auto_id[.@i] + "'";
 
announce "A " + .@name$[.@i] + " foi desoculpada.",bc_all,"0x00FF00";
mapwarp .@mapname$[.@i], "prontera", 156, 191;
}
setnpctimer 0;
end;
}

 

thank you = D
 

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Did you read the error ? Erro de banco de dados - Out of range value for column 'timer' at row 1 

 

I guess in your database, timer is INT, so that is why you got error. Change it to varchar and you will not get this error again.

Share this post


Link to post
Share on other sites
  • 0

Did you read the error ? Erro de banco de dados - Out of range value for column 'timer' at row 1 

 

I guess in your database, timer is INT, so that is why you got error. Change it to varchar and you will not get this error again.

 perfect

 

thank you =D

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.