Blockland Forums > Modification Help

CityRPG Syntax Error

Pages: << < (5/6) > >>

Red_Guy:

you've already been given the answer

name   = $CityRPG::jobs::name;
invest   = $CityRPG::jobs::initialInvestment;
pay          = $CityRPG::jobs::pay;
tools      = $CityRPG::jobs::tools;
education   = $CityRPG::jobs::education;
db            =  must supply a datablock value
sellItems   = $CityRPG::jobs::sellItems;
sellFood   = $CityRPG::jobs::sellFood;

What to put for the datablock value, depends on what your trying to do.  If you dont understand what to put there, then maybe you dont understand what your trying to do and should read some more examples, or try something else.



Blaze0:

What exactly IS a datablock value.

Chrono:


--- Quote from: Blaze0 on April 01, 2011, 02:45:18 PM ---What exactly IS a datablock value.

--- End quote ---
Stop coding.

You've been told already.

Blaze0:

I fixed THAT one, but now I got this.


--- Code: ---Add-Ons/gamemode_cityrpg/package.cs Line: 638 - Syntax error.
>>> Some error context, with ## on sides of error halt:
commandToClient(%obj.client, 'messageBoxOK', "Hammer killing is wrong. Especially in City Roleplays. Using a default tool to kill is unfair. No damage has been done to the person you just attacked. One more note, if you hammer a person that is wanted, they will take damage, as this is considered self defense.");
else
parent::onHitObject(%this, %obj, %slot, %col, %pos, %normal);

function ##T##aserImage::onHitObject(%this, %obj, %slot, %col, %pos, %normal)
{
if(%col.getClassName() $= "Player" && isObject(%col.client) && !%col.client.getWantedLevel())
commandToClient(%obj.client, 'centerPrint', "You cannot tase this person, they are not wanted. No, I don't care if they stole your cake. The cake is a lie, anyways.");
>>> Error report complete.

ADD-ON "gamemode_cityrpg" CONTAINS SYNTAX ERRORS

--- End code ---


Red_Guy:

Looks like your missing one or more closing }

go read (or re-read) iban's coding tutorial.  and pay special attention to the suff on syntax.

i'll give you the basics here:

every { must have a matching }
every ( must have a matching )

every statement must have a ;   at the end (except for if)
function stuff()  is not a statement so it doesnt need a ;  at the end



Pages: << < (5/6) > >>

Go to full version