SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 11/02/2019, 05:33 PM   #1
masterart
Little Clucker
 
Join Date: Feb 2019
Posts: 24
Reputation: 0
Default dialog errors

pawn Code:
format(string, sizeof(string), "NOTICE: %s has given you admin rights.", name);
ShowPlayerDialog(playerid, DIALOG_ADMIN_GIVEN, DIALOG_STYLE_MSGBOX, "Euphoria", string, "OK", "");

second line gives me these errors

pawn Code:
(460) : error 029: invalid expression, assumed zero
(460) : warning 215: expression has no effect
(460) : warning 215: expression has no effect
(460) : warning 215: expression has no effect
(460) : warning 215: expression has no effect
(460) : warning 215: expression has no effect
(460) : error 001: expected token: ";", but found ")"
(460) : error 029: invalid expression, assumed zero
(460) : fatal error 107: too many error messages on one line
masterart is offline   Reply With Quote
Old 11/02/2019, 05:38 PM   #2
Florin48
Huge Clucker
 
Join Date: Nov 2015
Location: Romania
Posts: 260
Reputation: 5
Default Re: dialog errors

post more lines
__________________
Quote:
If I helped you for a while, do not forget to reward me with a good reputation.
Discord: [ SherKan#8573 ]
Support me: [ http://swarife.com/4cpW ]
Gamemode for sale: [ http://ecleneue.com/3Jac ] check IP if you like it: [ 94.23.208.199:2515 ]
Florin48 is offline   Reply With Quote
Old 11/02/2019, 05:47 PM   #3
masterart
Little Clucker
 
Join Date: Feb 2019
Posts: 24
Reputation: 0
Default Re: dialog errors

pawn Code:
CMD:makeadmin(playerid,params[])
{
    new level, id, name[24], string[72];
    if(!IsPlayerAdmin(playerid)) return 1;
    if(sscanf(params, "ui", id, level)) return SendClientMessage(playerid, -1, "USAGE: /makeadmin [playerid] [1-5]");
    if(level < 0 || level > 5) return SendClientMessage(playerid, -1, "USAGE: /makeadmin [playerid] [1-5]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "ERROR: Player is not connected.");
    if(PlayerInfo[id][pAdmin] == level) return SendClientMessage(playerid, -1, "ERROR: Selected player is already this level.");
    GetPlayerName(id, name, sizeof(name));
    format(string, sizeof(string), "NOTICE: You have given %s admin rights.", name);
    SendClientMessage(playerid, -1, string);
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "NOTICE: %s has given you admin rights.", name);
    ShowPlayerDialog(playerid, DIALOG_ADMIN_GIVEN, DIALOG_STYLE_MSGBOX, "Euphoria", string, "OK", "");
    PlayerInfo[playerid][pAdmin] = level;
    return 1;
}
masterart is offline   Reply With Quote
Old 11/02/2019, 06:01 PM   #4
Florin48
Huge Clucker
 
Join Date: Nov 2015
Location: Romania
Posts: 260
Reputation: 5
Default Re: dialog errors

the code does not contain any error, so the compiler tells me.
__________________
Quote:
If I helped you for a while, do not forget to reward me with a good reputation.
Discord: [ SherKan#8573 ]
Support me: [ http://swarife.com/4cpW ]
Gamemode for sale: [ http://ecleneue.com/3Jac ] check IP if you like it: [ 94.23.208.199:2515 ]
Florin48 is offline   Reply With Quote
Old 11/02/2019, 07:15 PM   #5
masterart
Little Clucker
 
Join Date: Feb 2019
Posts: 24
Reputation: 0
Default Re: dialog errors

wait what? really?
masterart is offline   Reply With Quote
Old 11/02/2019, 07:17 PM   #6
masterart
Little Clucker
 
Join Date: Feb 2019
Posts: 24
Reputation: 0
Default Re: dialog errors

oh nvm, fixed it! something was wrong with my dialog define!
masterart 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
Dialog Errors? aoky Scripting Help 14 24/04/2017 08:16 AM
Dialog errors Bek_Loking Scripting Help 4 21/06/2014 09:19 PM
Dialog (5 errors) antoniotono97 Scripting Help 7 01/11/2013 04:42 PM
Dialog errors Kittylol Scripting Help 6 04/01/2013 08:12 PM
Dialog Errors r3k1lLz_ Help Archive 2 26/11/2010 10:33 PM


All times are GMT. The time now is 10:26 AM.


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