Blockland Forums > Modification Help
New system for my chat bot, but it has a weird syntax error!
(1/3) > >>
adam savage:
Client checking Add-On: Script_AdamBot
Loading Add-On: Script_AdamBot (CRC:421358409)
Add-Ons/Script_AdamBot/client.cs Line: 171 - Syntax error.
>>> Some error context, with ## on sides of error halt:
^^^^ if(hasItemOnList($AFKBot::List, %name))
^^^^^{
^^^^^^$AFKBot::list = removeItemfromList($AFKbot::List, %name);
^^^^^^commandToServer('messageSent', "AdamBot: " @ %name @ " is back!");
^^^^^}
^return parent::clientCmdChatMessage(%c,%a,%b,%fmsg,%cs,%name,%cp,%msg);
^}
};##
##ActivatePackage(AdamBot);

>>> Error report complete.

ADD-ON "Script_AdamBot" CONTAINS SYNTAX ERRORS

I already checked and nothing is wrong with the "{".
otto-san:
post the entire code

or possibly just what's immediately after it and everything before it

but preferably the former
Lugnut:
oh my god
that's the same stuff that's in rtb
return parent::clientCmdChatMessage(%c,%a,%b,%fmsg,%cs,%name,%cp,%msg);

do
this
parent::clientCmdChatMessage(%c,%a,%b,%fmsg,%cs,%name,%cp,%msg);
stuff delivers syntax errors every loving time you try to do anything with TCP objects
Treynolds416:
There's no semicolon after 'return'

Oh nvm I see it's all one line (reading op from phone)
Wordy:

--- Quote from: Lugnut1206 on March 29, 2012, 08:39:09 PM ---oh my god
that's the same stuff that's in rtb
return parent::clientCmdChatMessage(%c,%a,%b,%fmsg,%cs,%name,%cp,%msg);

do
this
parent::clientCmdChatMessage(%c,%a,%b,%fmsg,%cs,%name,%cp,%msg);
stuff delivers syntax errors every loving time you try to do anything with TCP objects

--- End quote ---
What's the use in returning the parent?
Navigation
Message Index
Next page

Go to full version