Problem with a string

Status
Not open for further replies.

vinnythebest

New Member
Oct 24, 2013
8
0
Hello guys!
I have a problem with a Source of Plus Emulator.
I have ADD a string for show a ADS on my hotel, but i have a problem with a code. RoomItem.cs (complete)
Link:

Where is write "//HERE IS A ERROR" is a error.
I don't know why the source give me this error.

Im sorry for my bad english.
Thanks for the support.
 

JayC

Always Learning
Aug 8, 2013
5,493
1,398
eeww because you're using .Name go find the sprite ID's or the item ID's and change it to work off of those.
 

vinnythebest

New Member
Oct 24, 2013
8
0
eeww because you're using .Name go find the sprite ID's or the item ID's and change it to work off of those.
mmm.. ok but i have make change but the problem is here anyway.
Are you sure is this variable to make bad?
Visual Studio says me:

Severity Code Description Project File Line
Error CS1513 } expected Plus C:\Users\Administrator\Desktop\EMU + SOURCE\ProjectPlus\HabboHotel\Items\RoomItem.cs 1532
 

JayC

Always Learning
Aug 8, 2013
5,493
1,398
omfg you're an idiot. You didn't even tell me the error to begin with, I thought you were trying to say that it doesn't work. You're missing a closing bracket to close out of the first IF statement so right where you put //HERE IS THE ERROR just change that to a closing bracket } and then debug, and run.
 

vinnythebest

New Member
Oct 24, 2013
8
0
omfg you're an idiot. You didn't even tell me the error to begin with, I thought you were trying to say that it doesn't work. You're missing a closing bracket to close out of the first IF statement so right where you put //HERE IS THE ERROR just change that to a closing bracket } and then debug, and run.
Hey, i have not offended.
Calm down.
However, if you check the code are all the way, it is why I do not understand what is the error.
All {, } or another.. is all closed.
I come from PAWNO of SA: MP and C # do not touch for years, why I wrote in the forum. No need to offend.
 
Last edited:

JayC

Always Learning
Aug 8, 2013
5,493
1,398
They are not all closed. First of all you are in an IF statement doing a case.. and you close your case and then say else if but you didn't close your first if.
 
  1. if (ShowGiver) //Start If
  2. { // Open Bracket
  3. Response.WriteString("PURCHASER_NAME");
  4. Response.WriteString(GiverName);
  5. Response.WriteString("PURCHASER_FIGURE");
  6. Response.WriteString(GiverLook);
  7. } Else if needs to go here or something then? // Close If
  8. Response.WriteString("PRODUCT_CODE");
  9. Response.WriteString(Product);
  10. Response.WriteString("state");
  11. Response.WriteString(MagicRemove ? "1" : "0");
  12. } //HERE IS A ERROR // Close Case
  13. // Random Else If else if (this.GetBaseItem().Name == "ads_mpu_720" || this.GetBaseItem().Name == "ads_background" || this.GetBaseItem().Name == "ads_mpu_300" || this.GetBaseItem().Name == "ads_mpu_160")
  14. {
 

vinnythebest

New Member
Oct 24, 2013
8
0
They are not all closed. First of all you are in an IF statement doing a case.. and you close your case and then say else if but you didn't close your first if.
 

  1. if (ShowGiver) //Start If
  2. { // Open Bracket
  3. Response.WriteString("PURCHASER_NAME");
  4. Response.WriteString(GiverName);
  5. Response.WriteString("PURCHASER_FIGURE");
  6. Response.WriteString(GiverLook);
  7. } Else if needs to go here or something then? // Close If
  8. Response.WriteString("PRODUCT_CODE");
  9. Response.WriteString(Product);
  10. Response.WriteString("state");
  11. Response.WriteString(MagicRemove ? "1" : "0");
  12. } //HERE IS A ERROR // Close Case
  13. // Random Else If else if (this.GetBaseItem().Name == "ads_mpu_720" || this.GetBaseItem().Name == "ads_background" || this.GetBaseItem().Name == "ads_mpu_300" || this.GetBaseItem().Name == "ads_mpu_160")
  14. {

xD Really?

case InteractionType.gift:
{ //1
string[] Data = this.ExtraData.Split((char)9);

uint GiverId = 0;
string GiftMessage = "";
int GiftRibbon = 1;
int GiftColor = 2;
bool ShowGiver = false;
string GiverName = "";
string GiverLook = "";
string Product = "A1 PIZ";

try
{ //2
GiverId = UInt32.Parse(Data[0]);
GiftMessage = Data[1];
GiftRibbon = Int32.Parse(Data[2]);
GiftColor = Int32.Parse(Data[3]);
ShowGiver = PlusEnvironment.EnumToBool(Data[4]);
GiverName = Data[5];
GiverLook = Data[6];
Product = Data[7];
} //2
catch
{ //3
} //3

int RibbonAndColor = (GiftRibbon * 1000) + GiftColor;

Response.WriteInt(RibbonAndColor);
Response.WriteInt(1);
Response.WriteInt(ShowGiver ? 6 : 4);
Response.WriteString("EXTRA_PARAM");
Response.WriteString("");
Response.WriteString("MESSAGE");
Response.WriteString(GiftMessage);
if (ShowGiver)
{ //4
Response.WriteString("PURCHASER_NAME");
Response.WriteString(GiverName);
Response.WriteString("PURCHASER_FIGURE");
Response.WriteString(GiverLook);
} //4
Response.WriteString("PRODUCT_CODE");
Response.WriteString(Product);
Response.WriteString("state");
Response.WriteString(MagicRemove ? "1" : "0");
} //1
else if (this.GetBaseItem().Name == "ads_mpu_720" || this.GetBaseItem().Name == "ads_background" || this.GetBaseItem().Name == "ads_mpu_300" || this.GetBaseItem().Name == "ads_mpu_160")
{ //5
Response.AppendInt32(0);
Response.AppendInt32(1);
if (ExtraData != "")
{ //6
Response.AppendInt32(ExtraData.Split(Convert.ToChar(9)).Length / 2);


for (int i = 0; i <= ExtraData.Split(Convert.ToChar(9)).Length - 1; i++)
{ //7
Response.AppendString(ExtraData.Split(Convert.ToChar(9)));
} //7
} //6
else
{ //8
Response.AppendInt32(0);
} //8
} //5
break;
Are all Closed, see the number.
I control all {, } etc.. is all closed.
Where u write random else if, is a fix by RZ but i modify for Plus with Response and no Message.

Anyway.. i have solved making a new code into if
Response.WriteString("PURCHASER_FIGURE");
Response.WriteString(GiverLook);
etc..

Thanks for the support, can u close the topic.
 
Last edited:
Status
Not open for further replies.

Users who are viewing this thread

Top