easydialog not working well (maybe YSI confusion?)
#1

Hi there.

I'm not used to post here, but I really want to figure out what is happening to my code.
I'm using easydialog.inc which is working pretty fine into my whole gamemode, EXCEPT in one include.

First of all, I want you to know that my gamemode is modular, which means I've separated each system into includes.
Here is a screenshot of my gamemode (called "core.pwn") where I show you all my includes. It should maybe help us find a solution.

PHP код:
#include <a_samp>
#include <a_players>
#include <fixes>
#include <sscanf2>
#include <streamer>
#include <YSI\y_iterate>
#include "..\ressources\miscellaneous\airbreak.pwn"
#include <YSI\y_hooks>
#include <YSI\y_groups>
#include <YSI\y_timers>
#include <YSI\y_va>
#include <YSI\y_ini>
#include <YSI\y_colours>
#include <YSI\y_commands>
#include <easydialog>
#include "..\ressources\defines.pwn"
#include "..\ressources\players\vars.pwn"
#include "..\ressources\functions.pwn"
#include "..\ressources\core_players.pwn"
#include "..\ressources\miscellaneous\bank.pwn"
#include "..\ressources\core_admins.pwn"
#include "..\ressources\admins\commands.pwn"
#include "..\ressources\core_jobs.pwn"
#include "..\ressources\miscellaneous\deaths.pwn"
#include "..\ressources\miscellaneous\entrances.pwn"
#include "..\ressources\miscellaneous\chat.pwn"
#include "..\ressources\miscellaneous\buyables.pwn"
#include "..\ressources\miscellaneous\payday.pwn"
#include        <dini>          // Pourquoi utiliser ini ? Car sinon, impossible de sauver un vйhicule un а un
#include        <dfile>
//#include      <mikefunc>
#include        <progress>
#include        <umessage>
#include "..\ressources\miscellaneous\inventory.pwn"
#include "..\ressources\miscellaneous\objectives.pwn"
#include "..\ressources\vehicles\core.pwn" 
So my concern now is to find out why easydialog.inc is not working into my vehicles include (ressources\vehicles\core.pwn).

Everything is working fine, except for all my dialogs into this include.

There is no syntax error, for sure, I know what I'm doing. I've tried to debug a dialog to see what is causing my issues, and I found that the response returned is somehow changed. When I use this:
PHP код:
public OnDialogPerformed(playeriddialog[], responsesuccess
To get my "response" parameter value, I'm getting 1 as the value, but in my dialog, it becomes 0...
PHP код:
Dialog:DIALOG_EDITION_0(playeridresponselistiteminputtext[])
{
    if(
IsPlayerConnected(playerid))
    {
        if(
IsPlayerConnected(playerid))
        {
                    
printf("response=%d"response)
            if(
response)
            {
                            
// It is not called, but if I change the above condition to if(reponse==1||response==0), it is called
                
switch(listitem// There is NO CASE in which my listitem is working... maybe I should tryn'a get listitem value? Imma going to
                

Don't be bothered by those useless IsPlayerConnected(playerid) checks. I putted them when I was switching to easydialog because I didn't want to get loose identation warnings. I'm going to delete those useless checks later on.

I'm calling properly my dialog (it is showing). I've tried to see if the problem was not coming from one of my includes. (In every other includes easydialog is working).

PHP код:
#include        <dini>          // Pourquoi utiliser ini ? Car sinon, impossible de sauver un vйhicule un а un
#include        <dfile>
//#include      <mikefunc>
#include        <progress>
#include        <umessage>
#include "..\ressources\miscellaneous\inventory.pwn"
#include "..\ressources\miscellaneous\objectives.pwn" 
I suspect when of these includes to be causing me troubles. I've tried to remove mikefunc.inc which didn't solve my problem. Maybe my problem is due to the fact i'm using dini.inc dfile.inc & y_ini.inc three different ini solutions... ?
I really don't know what is causing my problem. I adapted my vehicle include from another gamemode, which has this sort of strange behaviour into the whole gamemode. I strongly suspect YSI to be causing those issues, because it is frequently dealing with assembly language...

Thank you for looking at my issue, and giving me any kind of tips/advice.


EDIT: I have now solved this thread by my own.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)