Page 1 of 1

Broken Map Script Thing

Posted: Fri Jul 27, 2018 5:13 am
by Proxmin-O
As the title says,when i open a map with script on it (some maps works) and open the Script API and then close it. this error occurs:Superfighters Deluxe has not responding,is there any way to fix it,i tried uninstall but never work.
thanks anyways.

Re: Broken Map Script Thing

Posted: Sun Jul 29, 2018 5:53 pm
by Gurt
If the bug is related to custom map-making then include a download link to the map illustrating the problem.
The map should be bare-bone - only include what's necessary in the map to illustrate the problem.

If the problem is not related to a specific map please provide some more details what you mean.

Re: Broken Map Script Thing

Posted: Wed Aug 08, 2018 6:23 am
by Proxmin-O
btw i know whats the problem,The problem is this script:
Public void cot1(TriggerArgs args)
{
IPlayer immabutcher = (IPlayer)args.Sender;
immaButcher.SetProfile(((IObjectPlayerProfileInfo)Game.GetSingleObjectByCustomId(“cot1”)).GetProfile());
}
im sure that all maps containing this script is a problem.
btw its a custom map(or versus maps if available)
tried copy through microsoft word and paste it to script tab but problem occurs.
thanks anyways.

btw its a profile change script (when press or trigger the script,it changes your profile body)

and btw when i use this alternative script:
public void pro13(TriggerArgs args){
IPlayer ply = (IPlayer)args.Sender;
ply.SetProfile(((IObjectPlayerProfileInfo)Game.GetSingleObjectByCustomId("pro13")).GetProfile());
}
i dont have problem with this one

Re: Broken Map Script Thing

Posted: Wed Aug 08, 2018 3:14 pm
by Gurt
The first code contains syntax errors. Ask the author of the code to fix said problems. I would have written it something like this:

Code: Select all

public void cot1(TriggerArgs args) 
{
   if (args.Sender is IPlayer) {
      IPlayer plr = (IPlayer)args.Sender;
      IObjectPlayerProfileInfo objProfileInfo = Game.GetSingleObjectByCustomID<IObjectPlayerProfileInfo>("cot1");
      if (objProfileInfo != null) {
         plr.SetProfile(objProfileInfo.GetProfile());
      }
   }
}

Re: Broken Map Script Thing

Posted: Wed Aug 08, 2018 4:03 pm
by Sree
C# is case sensitive.

if you are wondering what the errors are in your script
Proxmin-O wrote:
Wed Aug 08, 2018 6:23 am
Public void cot1(TriggerArgs args)
Proxmin-O wrote:
Wed Aug 08, 2018 6:23 am
IPlayer immabutcher = (IPlayer)args.Sender;
immaButcher.SetProfile(((IObjectPlayerProfileInfo)Game.GetSingleObjectByCustomId(“cot1”)).GetProfile());
Proxmin-O wrote:
Wed Aug 08, 2018 6:23 am
immaButcher.SetProfile(((IObjectPlayerProfileInfo)Game.GetSingleObjectByCustomId(“cot1”)).GetProfile());

Re: Broken Map Script Thing

Posted: Thu Aug 09, 2018 11:59 am
by Proxmin-O
Thanks for all your comments