Author Topic: ONTEXT  (Read 6052 times)

HackBenjamin

  • Newbie
  • *
  • Posts: 35
ONTEXT
« on: March 30, 2008, 06:36:41 PM »
What i want this script to do is to give an explanation of the mafia role in question
Example:

<n00b> `bodyguard
<HackBenjamin> The Bodyguard can protect anyone he wants once per night, he can even protect himself. He cannot protect himself two nights in a row.

I can't figure out the problem with this script, everytime i try to save it, it gives me this message

"ERROR:modScriptFunctions:New role description.ice:Function :LoadScriptFile: Error Number:1002 : Syntax error"

Here is the script in question.

Code: [Select]
Sub ONTEXT(Message,Channel,Nickname,Host,ServerNumber)
if message = "`godfather" then
SendCommand "/msg #JuggaloMafia " & " The Godfather is the boss of the Mafia, when detected, he shows up as Townie "
end if
if message = "`mafia" then
SendCommand "/msg #JuggaloMafia " & " The Mafia can choose to kill one player per night, if the Doctor or BodyGuard pretects the player the Mafia attempts to kill, that player does not die. "
end if
if message = "`spy" then
SendCommand "/msg #JuggaloMafia " & " The Spy is the Mafia-aligned Detective, he can either learn another players role, or share one of his findings with the Mafia once per night. "
end if
if message = "`thief" then
SendCommand "/msg #JuggaloMafia " & " The Thief is Mafia-aligned, he can block one players action per night. "
end if
if message = "`sniper" then
SendCommand "/msg #JuggaloMafia " & " The Sniper can focus on one target for 3 nights, on the 3rd night, he can decide if he still wants to kill his target, if he is targeted in any way while he is shooting the target, he will miss the target. "
end if
if message = "`assassin" then
SendCommand "/msg #JuggaloMafia " & " The Assassin can attempt to kill one player per night, if he is targeted in any way during the kill, he will fail. "
end if
if message = "`bodyguard" then
SendCommand "/msg #JuggaloMafia " & " The Bodyguard can protect anyone he wants once per night, he can even protect himself. He cannot protect himself two nights in a row. "
end if
if message = "`doctor" then
SendCommand "/msg #JuggaloMafia " & " The Doctor can protect any other player he wants once per night. He just cannot protect himself. "
end if
if message = "`detective" then
SendCommand "/msg #JuggaloMafia " & " The Detective can detect anyone he wants once per night, when he detects someone, he learns their role. "
end if
if message = :`busdriver" then
SendCommand "/msg #JuggaloMafia " & " The Busdriver can switch whatever happens to any two players. For example, if the Mafia tries to kill player A, player B dies instead. "
end if
if message = "`armor" then
SendCommand "/msg #JuggaloMafia " & " The Armor is a Townie that cannot be killed at night, he can only be lynched. "
end if
if message = "`miller" then
SendCommand "/msg #JuggaloMafia " & " The Miller is a Townie that shows up as Mafia when detected. "
end if
if message = "`townie" then
SendCommand "/msg #JuggaloMafia " & " The Townie is just a normal person, he has no special skills. "
end if

End Sub


If it's a totally nooby and obvious problem, go easy on me lolz.

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: ONTEXT
« Reply #1 on: March 30, 2008, 07:08:46 PM »
if message = :`busdriver" then

The : should be a "

If it is a "syntax error" you can guarentee you have made a typing mistake.

On a second note, there is no need to open and close quotes.
Code: [Select]
SendCommand "/msg #JuggaloMafia " & " The Busdriver ...

can be

Code: [Select]
SendCommand "/msg #JuggaloMafia The Busdriver ...
Also, make sure you end with ",ServerNumber" at the end.

Code: [Select]
SendCommand "/msg #JuggaloMafia " & " The Godfather is the boss of the Mafia, when detected, he shows up as Townie " ,Servernumber

The IceChat God

HackBenjamin

  • Newbie
  • *
  • Posts: 35
Re: ONTEXT
« Reply #2 on: March 30, 2008, 07:19:37 PM »
Thanks man, That was a pretty quick response, i gotta remember to double check for typos -_-