SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 14/08/2012, 04:57 PM   #1
Deal-or-die
Huge Clucker
 
Deal-or-die's Avatar
 
Join Date: Oct 2010
Location: An Island 1000's of miles away
Posts: 366
Reputation: 22
Default A few errors I cannot see what I have done wrong. - Dialogs and Dialogs I guess...

It's Late, I can't think nor see straight and planning on going to bed once I sort this out... :P Ideas?

These are the errors
pawn Code:
(5000) : error 027: invalid character constant
(5000) : error 017: undefined symbol "d"
(5000) : warning 215: expression has no effect
(5000) : error 001: expected token: ";", but found "-identifier-"
(5000) : fatal error 107: too many error messages on one line

This is my script
pawn Code:
(4984)                  case 166: //How many rooms?
(4985)                  {
(4986)                  if(!response) return ShowPlayerDialog(playerid, 160, DIALOG_STYLE_LIST, "House Creation Menu", "","Continue","Close");
(4987)                  if(response)
(4988)                  {
(4989)                  new rooms;
(4990)                          sscanf(inputtext, "d", rooms);
(4991)                          if(rooms < 1 || rooms > MAX_ROOMS)
(4992)                          {
(4993)                              format(string, sizeof(string), "Please select a value of rooms between 1 and %d", MAX_ROOMS);
(4994)                          SendClientMessage(playerid, -1, string);
(4995)                          }
(4996)                          else
(4997)                          {
(4998)                          format(string, sizeof(string), "You selected %d Rooms", rooms);
(4999)                  SendClientMessage(playerid, -1, string);
(5000)                  House[playerid][hRooms] == '%d', inputtext);
(5001)                  return 1;
(5002)                          }
(5003)              }
(5004)          }
__________________
/////////////////////////// | Mini Moot | \\\\\\\\\\\\\\\\\\\\\\\\\\\

"I'm in the country that basically invented the Internet, and your getting faster speeds on an island 1,000miles away"

Last edited by Deal-or-die; 14/08/2012 at 05:33 PM.
Deal-or-die is offline   Reply With Quote
Old 14/08/2012, 05:23 PM   #2
[KHK]Khalid
Gangsta
 
[KHK]Khalid's Avatar
 
Join Date: Jan 2012
Location: Alexandria, Egypt
Posts: 854
Reputation: 136
Default Re: A few errors I cannot see what I have done wrong. - Dialogs and Dialogs I guess...

pawn Code:
House[playerid][hLock] == 0;
(4922)  SendClientMessage(playerid, COLOR_GREY, "You have set the {FF8000}lock{808080} level to {FF8000}0{808080}.";

Should be
pawn Code:
House[playerid][hLock] = 0;
(4922)  SendClientMessage(playerid, COLOR_GREY, "You have set the {FF8000}lock{808080} level to {FF8000}0{808080}.");

Do the same for the other lines. This will get rid of all these errors:

pawn Code:
(4921) : warning 215: expression has no effect
(4922) : error 001: expected token: ",", but found ";"
(4926) : warning 215: expression has no effect
(4927) : error 001: expected token: ",", but found ";"
(4931) : warning 215: expression has no effect
(4932) : error 001: expected token: ",", but found ";"
(4936) : warning 215: expression has no effect
(4937) : error 001: expected token: ",", but found ";"
(4941) : warning 215: expression has no effect
(4942) : error 001: expected token: ",", but found ";"
(4954) : warning 215: expression has no effect
(4955) : error 001: expected token: ",", but found ";"
(4959) : warning 215: expression has no effect
(4960) : error 001: expected token: ",", but found ";"
(4964) : warning 215: expression has no effect
(4965) : error 001: expected token: ",", but found ";"
(4969) : warning 215: expression has no effect
(4970) : error 001: expected token: ",", but found ";"
(4974) : warning 215: expression has no effect
(4975) : error 001: expected token: ",", but found ";"

And for these errors:
pawn Code:
(5000) : error 027: invalid character constant
(5000) : error 017: undefined symbol "d"
(5000) : warning 215: expression has no effect
(5000) : error 001: expected token: ";", but found "-identifier-"
(5000) : fatal error 107: too many error messages on one line

It's because of this line:
pawn Code:
House[playerid][hRooms] == '%d', inputtext);

I dunno what you are trying to do, but I think you meant to do it like this:
pawn Code:
House[playerid][hRooms] = rooms; // Aren't you storing the number of rooms?
[KHK]Khalid is offline   Reply With Quote
Old 14/08/2012, 05:35 PM   #3
Deal-or-die
Huge Clucker
 
Deal-or-die's Avatar
 
Join Date: Oct 2010
Location: An Island 1000's of miles away
Posts: 366
Reputation: 22
Default Re: A few errors I cannot see what I have done wrong. - Dialogs and Dialogs I guess...

Quote:
Originally Posted by HellSphinX View Post
It's because of this line:
pawn Code:
House[playerid][hRooms] == '%d', inputtext);
I figured this much :P

Quote:
Originally Posted by HellSphinX View Post
I dunno what you are trying to do, but I think you meant to do it like this:
pawn Code:
House[playerid][hRooms] = rooms; // Aren't you storing the number of rooms?
And Yea, I am trying to store the number of input rooms that doesn't exceed MAXROOMS or bellow 1 room.
__________________
/////////////////////////// | Mini Moot | \\\\\\\\\\\\\\\\\\\\\\\\\\\

"I'm in the country that basically invented the Internet, and your getting faster speeds on an island 1,000miles away"
Deal-or-die is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can someone tell me whats wrong here? 4 Errors. ArmandoRamiraz Scripting Help 8 17/07/2012 07:54 PM
Errors gone wrong..a stormchaser206 Scripting Help 2 23/06/2012 09:09 PM
WTF lots errors?What i've done wrong? Face9000 Help Archive 11 13/12/2010 01:40 PM
Whats wrong with this?[7 warnings][3 errors][1 fatal error] Tigerbeast11 Help Archive 2 08/11/2009 02:32 PM


All times are GMT. The time now is 04:17 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.