Jump to content
  • 0

What's wrong with this?


Newbie Scripter

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  11/25/13
  • Last Seen:  

function randomString;

if( .status == 1 ){
	mes "Event is preparing...try again in few seconds.";
}else if( .status == 2 ){

	if( @failed > gettimetick(1) ){
		mes "You failed this round. You got only 1 chances for each round.";
		close;
	}
	
	mes "Enter:";
	mes "^FF0000"+.string$+"^000000";
	mes " ";
	mes "You got "+.round_delay+" seconds to answer.";
	input .@input$;
	if( .status == 2 && .string$ != "" && .@input$ == .string$ )	{
		.string$ = "";
		.status = 1;
		mes "Gratz you won...";
		npctalk strcharinfo(0)+" just won the game with "+getnpctimer(0)+" miliseconds..";
		stopnpctimer;

Here's the error

 

k390.jpg

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  104
  • Reputation:   6
  • Joined:  01/23/14
  • Last Seen:  

the script have a problem reading the "." in front of the string$ at line 34..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  11/25/13
  • Last Seen:  

Yes i know what the error is. I'd like to know what should be the solution I can't work with it. Im using Eathena

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Try to use: set .string$, "";

/?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  135
  • Reputation:   41
  • Joined:  02/05/14
  • Last Seen:  

Yes i know what the error is. I'd like to know what should be the solution I can't work with it. Im using Eathena

 

Try to use: set .string$, "";

/?

 

Might want to upgrade to rAthena if your script parser is so outdated that it doesn't know what to do without using set. Many scripts that are optimised for rAthena will appear to have compatibility issues. There isn't really that great of a reason to continue using eAthena anymore, quite honestly; unless you enjoy the multitude of bugs, of course.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  11/25/13
  • Last Seen:  

Any suggestions on how to work around with this script? or a fix maybe so what It could work on EA? I really appreciate it. thanks!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  135
  • Reputation:   41
  • Joined:  02/05/14
  • Last Seen:  

Just change the way that the variables are being set. In rAthena, they can be set two ways:

set .var, 0;
.var = 0;

Both lines in the above example have the same result. In eAthena, the proper way is to use set, so in your case, replace these lines:

.string$ = "";
.status = 1;

with these lines:

set .string$, "";
set .status, 1;

If there are any other variables being set in the former manner, simply replace them with set commands as needed.

Edited by Missingno
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...