Jump to content

Question

Anyone able to help me on this script?
 

//Weekend Events (Friday, saturday, and sunday//Script developed by Aeromesi prontera,150,150,4	script	Noah	89,{		set .noa$, "^FF0000[Noah]^000000"; if (.frifin$ == 1 && (gettime(4)==3)) {	mes .noa$;	mes "You already completed Fridays quest.";	close;} else { goto	startquest; }if (.satfin$ == 1 && (gettime(4)==4)) {	mes .noa$;	mes "You already completed Saturdays quest.";	close;} else { goto startquest; }if (.sunfin$ == 1 && (gettime(4)==5)) {	mes .noa$;	mes "You already completed Sundays quest.";	close;} else { goto startquest; }if (gettime(4)==6)	mes .noa$;	mes "You can't do any quests until Friday, Saturday, and Sunday.";	close;startquest:	set .frifin$, 0;	set .satfin$, 0;	set .sunfin$, 0;	mes .noa$;	mes "Hello "+strcharinfo(0)+".";	mes "It's the weekend, have you had a busy week?";	mes "Gotta pay bills and can't afford to donate?";next;	mes .noa$;	mes "Well I offer quests throughout the weekend (Friday, Saturday, Sunday) so you can have 500 cash points.";	mes "You may only do each quest ^FF0000ONCE^000000 per day out of the 3 days.";	mes "Then the next weekend, it resets.";next;	mes .noa$;	mes "So, wanna do a quest?";next;	menu "Yes sir!",yess,"No thanks.",nothx;  yess:// Quest for Friday	if ( gettime(4)==3) {	mes .noa$;	mes "Today is Fridays Quest!";	mes "You will need to gather 1000 Red Potions and 10m Zeny.";	mes "Alright, I'll be waiting until you come back with 1000 Potions and 10m Zeny.";	mes "Now, let me check if you already have the required amount of Zeny and Red Potions.";next;if(countitem(501)) >= 1000 && Zeny >= 10000000 {	mes "You have the required amount of Red potions and Zeny, so for that, here is your cash points.";	set #CASHPOINTS, #CASHPOINTS+500;	set Zeny, Zeny-10000000;	delitem 501,1000;	set .fritalk$, 1;	close;}} else {	mes .noa$;	mes "You don't have 1000 Red Potions or 10m Zeny yet.";	close;} nothx:	mes .noa$;	mes "Alright, well come back if you decided you changed your mind!";	close;}/*-	script	weekend##00	-1,{	 if (gettime(4)== 1 || 2 || 3 || 4 ) {	set .fritalk$, 0;	set .sattalk$, 0;	set .suntalk$, 0;}}*/

The error I get when clicking on the NPC is:


[Error]: script:op_2: invalid data for operator C_EQ

[Debug]: Data: string value=""

[Debug]: Data: number value=1

Debug source npc at prontera,150,150 etc...

Edited by Aeromesi

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Anyone able to help me on this script?

 

//Weekend Events (Friday, saturday, and sunday//Script developed by Aeromesi prontera,150,150,4	script	Noah	89,{		set .noa$, "^FF0000[Noah]^000000"; if (.frifin$ == 1 && (gettime(4)==3)) {	mes .noa$;	mes "You already completed Fridays quest.";	close;} else { goto	startquest; }if (.satfin$ == 1 && (gettime(4)==4)) {	mes .noa$;	mes "You already completed Saturdays quest.";	close;} else { goto startquest; }if (.sunfin$ == 1 && (gettime(4)==5)) {	mes .noa$;	mes "You already completed Sundays quest.";	close;} else { goto startquest; }if (gettime(4)==6)	mes .noa$;	mes "You can't do any quests until Friday, Saturday, and Sunday.";	close;startquest:	set .frifin$, 0;	set .satfin$, 0;	set .sunfin$, 0;	mes .noa$;	mes "Hello "+strcharinfo(0)+".";	mes "It's the weekend, have you had a busy week?";	mes "Gotta pay bills and can't afford to donate?";next;	mes .noa$;	mes "Well I offer quests throughout the weekend (Friday, Saturday, Sunday) so you can have 500 cash points.";	mes "You may only do each quest ^FF0000ONCE^000000 per day out of the 3 days.";	mes "Then the next weekend, it resets.";next;	mes .noa$;	mes "So, wanna do a quest?";next;	menu "Yes sir!",yess,"No thanks.",nothx;  yess:// Quest for Friday	if ( gettime(4)==3) {	mes .noa$;	mes "Today is Fridays Quest!";	mes "You will need to gather 1000 Red Potions and 10m Zeny.";	mes "Alright, I'll be waiting until you come back with 1000 Potions and 10m Zeny.";	mes "Now, let me check if you already have the required amount of Zeny and Red Potions.";next;if(countitem(501)) >= 1000 && Zeny >= 10000000 {	mes "You have the required amount of Red potions and Zeny, so for that, here is your cash points.";	set #CASHPOINTS, #CASHPOINTS+500;	set Zeny, Zeny-10000000;	delitem 501,1000;	set .fritalk$, 1;	close;}} else {	mes .noa$;	mes "You don't have 1000 Red Potions or 10m Zeny yet.";	close;} nothx:	mes .noa$;	mes "Alright, well come back if you decided you changed your mind!";	close;}/*-	script	weekend##00	-1,{	 if (gettime(4)== 1 || 2 || 3 || 4 ) {	set .fritalk$, 0;	set .sattalk$, 0;	set .suntalk$, 0;}}*/

The error I get when clicking on the NPC is:

 

[Error]: script:op_2: invalid data for operator C_EQ

[Debug]: Data: string value=""

[Debug]: Data: number value=1

Debug source npc at prontera,150,150 etc...

 

[font='courier new', courier, monospace]Show a screen shot of the error from the emulator, so they can help you out a bit better & faster~[/font]

Share this post


Link to post
Share on other sites
  • 0

The problem is here:

if (.frifin$ == 1 && (gettime(4)==3)) {

And here:

if (.satfin$ == 1 && (gettime(4)==4)) {

You're trying to compare a string variable to a number.

 

Just erase the ' $ ' sign, and things should fix itself.

Also, you shouldn't be using ' goto ' anymore as the command will soon be removed. Instead use the command: callsub <label>{,<argument>,...<argument>};

 

Edit:

@Offtopic - While I do not remember you (sorry lol) I do remember the script. It allowed users to have a sub-job allowing them to select upto 5 skills from that sub-job and add it to their own skills. Sort of making a hybrid.

it was far over powered lol. EDP + Any power hit skill @.@;

Edited by GmOcean

Share this post


Link to post
Share on other sites
  • 0

GMOcean not sure if you remember me but you made me a FXII script for job changing system years and years ago on eA. Thanks again :)

Share this post


Link to post
Share on other sites
  • 0

 

Anyone able to help me on this script?

 

//Weekend Events (Friday, saturday, and sunday//Script developed by Aeromesi prontera,150,150,4	script	Noah	89,{		set .noa$, "^FF0000[Noah]^000000"; if (.frifin$ == 1 && (gettime(4)==3)) {	mes .noa$;	mes "You already completed Fridays quest.";	close;} else { goto	startquest; }if (.satfin$ == 1 && (gettime(4)==4)) {	mes .noa$;	mes "You already completed Saturdays quest.";	close;} else { goto startquest; }if (.sunfin$ == 1 && (gettime(4)==5)) {	mes .noa$;	mes "You already completed Sundays quest.";	close;} else { goto startquest; }if (gettime(4)==6)	mes .noa$;	mes "You can't do any quests until Friday, Saturday, and Sunday.";	close;startquest:	set .frifin$, 0;	set .satfin$, 0;	set .sunfin$, 0;	mes .noa$;	mes "Hello "+strcharinfo(0)+".";	mes "It's the weekend, have you had a busy week?";	mes "Gotta pay bills and can't afford to donate?";next;	mes .noa$;	mes "Well I offer quests throughout the weekend (Friday, Saturday, Sunday) so you can have 500 cash points.";	mes "You may only do each quest ^FF0000ONCE^000000 per day out of the 3 days.";	mes "Then the next weekend, it resets.";next;	mes .noa$;	mes "So, wanna do a quest?";next;	menu "Yes sir!",yess,"No thanks.",nothx;  yess:// Quest for Friday	if ( gettime(4)==3) {	mes .noa$;	mes "Today is Fridays Quest!";	mes "You will need to gather 1000 Red Potions and 10m Zeny.";	mes "Alright, I'll be waiting until you come back with 1000 Potions and 10m Zeny.";	mes "Now, let me check if you already have the required amount of Zeny and Red Potions.";next;if(countitem(501)) >= 1000 && Zeny >= 10000000 {	mes "You have the required amount of Red potions and Zeny, so for that, here is your cash points.";	set #CASHPOINTS, #CASHPOINTS+500;	set Zeny, Zeny-10000000;	delitem 501,1000;	set .fritalk$, 1;	close;}} else {	mes .noa$;	mes "You don't have 1000 Red Potions or 10m Zeny yet.";	close;} nothx:	mes .noa$;	mes "Alright, well come back if you decided you changed your mind!";	close;}/*-	script	weekend##00	-1,{	 if (gettime(4)== 1 || 2 || 3 || 4 ) {	set .fritalk$, 0;	set .sattalk$, 0;	set .suntalk$, 0;}}*/

The error I get when clicking on the NPC is:

 

[Error]: script:op_2: invalid data for operator C_EQ

[Debug]: Data: string value=""

[Debug]: Data: number value=1

Debug source npc at prontera,150,150 etc...

 

[font='courier new', courier, monospace]Show a screen shot of the error from the emulator, so they can help you out a bit better & faster~[/font]

This is the error from the map-server... o_O

 

[Error]: script:op_2: invalid data for operator C_EQ

[Debug]: Data: string value=""

[Debug]: Data: number value=1

Debug source npc at prontera,150,150 etc...

Share this post


Link to post
Share on other sites
  • 0

 

[Error]: script:op_2: invalid data for operator C_EQ

 

[Debug]: Data: string value=""

[Debug]: Data: number value=1

Debug source npc at prontera,150,150 etc...

 

 

 

 

The error is like GmOcean says, you are trying to compare a string and a number.

 

 

if (.frifin$ == 1 && (gettime(4)==3)) {

 

If you need to know if the .frifin$ variable has something stored, you should do this:

 

 

if (.frifin$ == "" && (gettime(4)==3)) {

 

By just adding double ".

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

×
×
  • Create New...

Important Information

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