Help! FAST
#1

So I'm starting a new script and I was using Scripting Machine and I was doing dialogs. I compiled and I got this:
Код:
C:\Users\Zach\Documents\Instant Warfare\ModernWarfare.pwn(118) : warning 217: loose indentation
C:\Users\Zach\Documents\Instant Warfare\ModernWarfare.pwn(120) : error 017: undefined symbol "DIALOG_CREDITS"
C:\Users\Zach\Documents\Instant Warfare\ModernWarfare.pwn(125) : error 017: undefined symbol "DIALOG_COMMANDS"
C:\Users\Zach\Documents\Instant Warfare\ModernWarfare.pwn(128) : warning 217: loose indentation
C:\Users\Zach\Documents\Instant Warfare\ModernWarfare.pwn(258) : error 017: undefined symbol "DIALOG_COMMANDS"
C:\Users\Zach\Documents\Instant Warfare\ModernWarfare.pwn(262) : error 017: undefined symbol "DIALOG_CREDITS"
C:\Users\Zach\Documents\Instant Warfare\ModernWarfare.pwn(269) : warning 225: unreachable code
C:\Users\Zach\Documents\Instant Warfare\ModernWarfare.pwn(269) : warning 217: loose indentation
C:\Users\Zach\Documents\Instant Warfare\ModernWarfare.pwn(269) : error 029: invalid expression, assumed zero
C:\Users\Zach\Documents\Instant Warfare\ModernWarfare.pwn(269) : error 004: function "OnPlayerClickPlayer" is not implemented
C:\Users\Zach\Documents\Instant Warfare\ModernWarfare.pwn(273) : error 030: compound statement not closed at the end of file (started at line 261)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


7 Errors.
Reply
#2

Put this at the top of your script
pawn Код:
new DIALOG_CREDITS;
new DIALOG_COMMANDS;
As for the loose indentation make sure the lines match.
For the rest you need to give some code, we are scripters not mentalist.
Reply
#3

Quote:
Originally Posted by DaRk_RaiN
Посмотреть сообщение
Put this at the top of your script
pawn Код:
new DIALOG_CREDITS;
new DIALOG_COMMANDS;
As for the loose indentation make sure the lines match.
For the rest you need to give some code, we are scripters not mentalist.
Ayo? Dialogs are not defined that ways!!

pawn Код:
#define    DIALOG_CREDITS      234
#define    DIALOG_COMMANDS  235
Reply
#4

Quote:
Originally Posted by Ballu Miaa
Посмотреть сообщение
Ayo? Dialogs are not defined that ways!!

pawn Код:
#define    DIALOG_CREDITS      234
#define    DIALOG_COMMANDS  235
Ma bad
Reply
#5

Actually this is what I have.
I have already added that:
Код:
#define DIALOG_COMMANDS   25639
#define DIALOG_CREDITS   27312
Reply
#6

Could you atleast show this code?
Reply
#7

These two lines
pawn Код:
#define DIALOG_COMMANDS   25639
#define DIALOG_CREDITS   27312
should be before the line 100. Basically, after the include(s).

And NO. Don't use machince for something you can do easier with your hands.
Reply
#8

This is what I have for OnDialogResponse
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == DIALOG_COMMANDS)
	{
		//The player has pressed "Close"(because it's de only avaliable button.)
	{
	if(dialogid == DIALOG_CREDITS)
	{
		//The player has pressed "Close"(because it's de only avaliable button.)
	}
    return 0;
}
This is what I have in commands (this is where I want the dialogs to appear)
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/kill", cmdtext, true, 5) == 0)
    {
        SetPlayerHealth(playerid, 0.0);
        return 1;
    }
        if (strcmp("/credits", cmdtext, true, 8) == 0)
    {
        ShowPlayerDialog(playerid, DIALOG_CREDITS, DIALOG_STYLE_MSGBOX, "Credits", "Scripter: DJTunes\nHelper: Captainprice", "Close", "");//redits
        return 1;
    }
	    if (strcmp("/commands", cmdtext, true, 10) == 0)
    {
        ShowPlayerDialog(playerid, DIALOG_COMMANDS, DIALOG_STYLE_MSGBOX, "Commands", "/commands = /kill, /credits, ", "Close", "");
        return 1;
    }
    return 0;
}
Here's where my defines are
Код:
#include <a_samp>

#if defined FILTERSCRIPT

#define DIALOG_COMMANDS   25639
#define DIALOG_CREDITS   27312
Reply
#9

Try

#if defined FILTERSCRIPT

#define DIALOG_COMMANDS 25639
#define DIALOG_CREDITS 27312

to

#define DIALOG_COMMANDS 25639
#define DIALOG_CREDITS 27312

#if defined FILTERSCRIPT
Reply
#10

Quote:
Originally Posted by Typhome
Посмотреть сообщение
Try

#if defined FILTERSCRIPT

#define DIALOG_COMMANDS 25639
#define DIALOG_CREDITS 27312

to

#define DIALOG_COMMANDS 25639
#define DIALOG_CREDITS 27312

#if defined FILTERSCRIPT
It worked a bit 70% at least. Now there's 3 other errors that read the following:
Код:
(268) : error 029: invalid expression, assumed zero
(268) : error 004: function "OnPlayerClickPlayer" is not implemented
(272) : error 030: compound statement not closed at the end of file (started at line 260)
This is what's on those lines:
Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
	return 1;
}
I don't have a 272...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)