Jump to content
  • 0

Couple of Warnings and Debug on PRIVATE MVP room :(


NexusXVI

Question


  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   6
  • Joined:  01/18/12
  • Last Seen:  

OGM.png

Anybody knows how to fix this?

I attached the Script itself for more details.. if its ok.. THNX

MvPROOM.txt

Link to comment
Share on other sites

14 answers to this question

Recommended Posts


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

The script you can download is not really tabulated, hard to check.

Anyway I'm pretty sure that error comes from a command who needs a string to be used, and passing just an integer. Sure way to correct it is:

set .@num, atoi(getarg(0)+"");

Same for getstrlen command.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   6
  • Joined:  01/18/12
  • Last Seen:  

So I need to replace the script with that sir?

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:  

Try that yeah. Also,

set .@l, getstrlen(.@num+"");

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   6
  • Joined:  01/18/12
  • Last Seen:  

Can you tell me where to put that statement?

set .rentitemid, 674; // item id use for rent a room - 674 - mithil coin

set .rentitemamount, 0; // amount of items to rent a room

set .rentcost, 10000000; // otherwise, zeny cost to rent a room

It is like this..

so i need to remove the rentcost

I did find this on top of the script

//	....... if your server has { Overwriting user function [int__] } don't blame me ..........
function	script	int__	{
set .@num, atoi(getarg(0));
if ( .@num == 0 || .@num >= 2147483647 ) return getarg(0);
set .@l, getstrlen(.@num);
for ( set .@i,0; .@i < .@l; set .@i, .@i + 1 ) {
	set .@num$, .@num % pow(10,.@i+1) / pow(10,.@i) + .@num$;
	if ( (.@i+1) % 3 == 0 && .@i+1 != .@l ) set .@num$, ","+ .@num$;
}
return .@num$;

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:  

Which "statement"? O.o

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   6
  • Joined:  01/18/12
  • Last Seen:  

well first i have no idea on how to put or remove or add it :) sorry sir

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:  

try with

OnInit:
set .rentitemid, 674; // item id use for rent a room - 674 - mithil coin
set .rentitemamount, 0; // amount of items to rent a room
set .rentcost, 10000000; // otherwise, zeny cost to rent a room
end;

at the end of the script, before the last } (not in the function of course)

I can't really read your script as in the txt file it's not well tabulated and have no time to retabulate :< Try to pastebin for me please :3

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   6
  • Joined:  01/18/12
  • Last Seen:  

http://pastebin.com/raw.php?i=kffzGxkm Edited by Emistry
Fixed Broken Pastebin Link
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

@Nexus

cgEaE.png

change it to whst @Ryokem mentioned in post#4

  • Upvote 1
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:  

First, do the changes I told you to do to fiz the warnings.

then, just change the values of those 3 variables as you like.

set .rentitemid, 674; // item id use for rent a room - 674 - mithil coin

set .rentitemamount, 0; // amount of items to rent a room

set .rentcost, 10000000; // otherwise, zeny cost to rent a room

Set a '0' as .rentcost if you want players not to pay Zeny for renting the room.

Also, set a number X>0 as the amount of .rentitem item you want players to pay for renting.

If you want a "free" renting, just leave .rentitem = 674 and the other 2 at 0.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   6
  • Joined:  01/18/12
  • Last Seen:  

Untitled-13.jpg

Fixed the Data: variable name='@num' index=0

1 more error :( THnx sir Emistry

ill try that Ryokem

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

set .@num, atoi( ""+getarg(0) );

actually this problem has been fixed and asked several times in board....

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   6
  • Joined:  01/18/12
  • Last Seen:  

Sorry sir EMistry Its good now :) Thanks Ryokem TOO :)

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:  

set .@num, atoi(getarg(0)+"");

Indeed, I gave you the fix already :P

anyway np, you're welcome ;)

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...