Author Topic: Error...  (Read 877 times)

What dose this mean?
Code: [Select]
Add-Ons/GameMode_CityRPG/common.cs Line: 1748 - Syntax error.
>>> Some error context, with ## on sides of error halt:
^^^^^messageClient(%client, '', "\c6You give \c3$" @ %money SPC "\c6to \c3" @ %target.name @ "\c6.");

^^^^^messageClient(%target, '', "\c3" @ %client.name SPC "\c6has given you \c3$" @ %money @ "\c6.");

^^^^^

^^^^^CityRPGData.getData(%client.bl_id).valueMoney - %money;##
##
^^^^^CityRPGData.getData(%target.bl_id).valueMoney + %money;

^^^^^

^^^^^%client.SetInfo();

^^^^^%target.SetInfo();

^^^^}

^^^^else

^^^^^messageClient(%client, '', "\c6You must be looking at and be in a reasonable distance of the player in order to give them money.");
>>> Error report complete.

It means an idiot packaged your copy of CityRPG.


Oh, woops, you packaged.
You would be an idiot if you released the add-on without checking it.

What is it trying to do, increment CityRPGData.getData(%target.bl_id).valueMoney by %money?

Oh, woops, you packaged.
You would be an idiot if you released the add-on without checking it.

What is it trying to do, increment CityRPGData.getData(%target.bl_id).valueMoney by %money?
A pathetic attempt to fix /givemoney

A pathetic attempt to fix /givemoney
Answer the question.
increment CityRPGData.getData(%target.bl_id).valueMoney by %money?
"add %money to CityRPGData..."

Answer the question."add %money to CityRPGData..."
Not sure,,,

A pathetic attempt to fix /givemoney

Is this Jookia's?  I had this problem after v13 too, so if it is Jookia's use this:
Code: [Select]
%target = containerRayCast(%this.getEyePoint(), vectorAdd(vectorScale(vectorNormalize(%this.getEyeVector()), 8), %this.getEyePoint()), $typeMasks::all, %this);

Is this Jookia's?  I had this problem after v13 too, so if it is Jookia's use this:
Code: [Select]
%target = containerRayCast(%this.getEyePoint(), vectorAdd(vectorScale(vectorNormalize(%this.getEyeVector()), 8), %this.getEyePoint()), $typeMasks::all, %this);
You are so oblivious that it's not even funny. That doesn't even have to do with this.
Change the " - " and " + " to "-= " and "+= "

You are so oblivious that it's not even funny. That doesn't even have to do with this.
Change the " - " and " + " to "-= " and "+= "
yes


Oh, woops, you packaged.
You would be an idiot if you released the add-on without checking it.

What is it trying to do, increment CityRPGData.getData(%target.bl_id).valueMoney by %money?

So you don't even see that the problem is a syntax error?

So you don't even see that the problem is a syntax error?
Yes, I am trying to figure out what he wants to do, it's being caused because of the stand-alone math operators.

Oh okay.
Obviously take money away from client and give it to target.

Simply change:
.valueMoney - %money;
.valueMoney + %money;

to:
.valueMoney-=%money;
.valueMoney+=%money;

Code: [Select]
function serverCmdgiveMoney(%client, %money, %name)
{
%money = mFloor(%money);

if(%money > 0)
{
if((CityRPGData.getData(%client.bl_id).valueMoney -= %money) >= 0)
{
if(isObject(%client.player))
{
%target = containerRayCast(%client.player.getEyePoint(), vectorAdd(vectorScale(vectorNormalize(%client.player.getEyeVector()), 5), %client.player.getEyePoint()), $typeMasks::playerObjectType).client;

if(isObject(%target))
{
messageClient(%client, '', "\c6You give \c3$" @ %money SPC "\c6to \c3" @ %target.name @ "\c6.");
messageClient(%target, '', "\c3" @ %client.name SPC "\c6has given you \c3$" @ %money @ "\c6.");

CityRPGData.getData(%client.bl_id).valueMoney -= %money;
CityRPGData.getData(%target.bl_id).valueMoney += %money;

%client.SetInfo();
%target.SetInfo();
}
else
messageClient(%client, '', "\c6You must be looking at and be in a reasonable distance of the player in order to give them money.");
}
else
messageClient(%client, '', "\c6Spawn first before you use this command.");
}
else
messageClient(%client, '', "\c6You don't have that much money to give.");
}
else
messageClient(%client, '', "\c6You must enter a valid amount of money to give.");
}
« Last Edit: February 06, 2010, 01:44:09 AM by pitfall »