SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 09/08/2019, 01:22 AM   #1
Spawe
Big Clucker
 
Spawe's Avatar
 
Join Date: Sep 2018
Posts: 156
Reputation: 3
Default Dini2 warning

How do I solve that warning that throws the include dini2?


PHP Code:
dini2.inc(200) : warning 219local variable "NULL" shadows a variable at a preceding level 
__________________
New project in creation, follow us in fb to not miss anything
Spawe is offline   Reply With Quote
Old 09/08/2019, 07:30 AM   #2
GTLS
High-roller
 
GTLS's Avatar
 
Join Date: Aug 2014
Location: India
Posts: 1,047
Reputation: 115
Default Re: Dini2 warning

You have another include with NULL defined. Try including dini just below a_samp.
__________________

I don't help for rep. I help cuz I was helped in the past.


Retired from SAMP Scene. Might open SAMP Forums once in a while.

Some treats for ya. Click em
Basic House System
Simple Speedo
Base Login/Register Script

GTLS is offline   Reply With Quote
Old 19/08/2019, 07:28 PM   #3
Spawe
Big Clucker
 
Spawe's Avatar
 
Join Date: Sep 2018
Posts: 156
Reputation: 3
Default Re: Dini2 warning

It doesn't work
__________________
New project in creation, follow us in fb to not miss anything
Spawe is offline   Reply With Quote
Old 19/08/2019, 11:02 PM   #4
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,179
Reputation: 404
Default Re: Dini2 warning

open dini2 and remove the definition of isnull
__________________
Quote:
Originally Posted by Andy
My anti cheat is still relevant *puts shades on* https://github.com/RogueDrifter/Anti_cheat_pack

[Github]:Link [Gists]:Link [Forum]:Link [Server]:Link [Discord]:Link
RogueDrifter is offline   Reply With Quote
Old 20/08/2019, 02:50 AM   #5
Spawe
Big Clucker
 
Spawe's Avatar
 
Join Date: Sep 2018
Posts: 156
Reputation: 3
Default Re: Dini2 warning

That I have to erase, the notice appears on line 200


PHP Code:
stock dini_Get(const filename[], const key[]) {
    static const 
NULL[DINI_MAX_FIELD_VALUE] = "\0"//LINE 200

    
new Dini:file INVALID_DINI_FILE;
    for (new 
Dini:Dini:0Dini:DINI_MAX_FILESi++) {
        if (
diniFile[i][E_DINI_FILENAME][0] && !strcmp(diniFile[i][E_DINI_FILENAME], filename)) {
            
file i;
            break;
        }
    }

    if (
file == INVALID_DINI_FILE) {
        if (!
fexist(filename)) {
            return 
NULL;
        }

        
file dini_ParseFile(filename);
        if (
file == INVALID_DINI_FILE) {
             return 
NULL;
        }
    }


    for (new 
0diniFile[file][E_DINI_NUM_FIELDS]; i++) {
        if (!
strcmp(diniFileFields[file][i], key)) {
            return 
diniFileValues[file][i];
        }
    }

    return 
NULL;

__________________
New project in creation, follow us in fb to not miss anything
Spawe is offline   Reply With Quote
Old 20/08/2019, 10:36 PM   #6
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,765
Reputation: 840
Default Re: Dini2 warning

Rename it to DINI_NULL.
__________________

Follow me on Github: Follow me on Spotify: Donate on Paypal:

Gammix 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
Dini2 problem andrejc999 Scripting Help 3 02/03/2019 07:16 AM
Updating from old dini to dini2 showing warning? mmlinaric Scripting Help 2 10/02/2019 06:48 PM
dini2.inc - basics help? maksicnm Scripting Help 0 24/01/2019 09:13 PM
[Off] Dini2? yurin Português/Portuguese 5 27/11/2016 03:09 AM
dini2 doesn't write GoldenLion Scripting Help 0 26/10/2016 09:33 PM


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


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