Error Script
#1

Hi all, I tried to make Dynamic ATM System with Y_INI saving system.
But I get this error
pawn Код:
C:\Users\ariefkyano\Desktop\Test RP\gamemodes\Respect4.pwn(18903) : error 020: invalid symbol name ""
C:\Users\ariefkyano\Desktop\Test RP\gamemodes\Respect4.pwn(18903) : error 036: empty statement
C:\Users\ariefkyano\Desktop\Test RP\gamemodes\Respect4.pwn(18903) : error 017: undefined symbol "id"
C:\Users\ariefkyano\Desktop\Test RP\gamemodes\Respect4.pwn(18903) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
This is the code:
pawn Код:
for(new id = 1;id < sizeof(MAX_ATM);id++) // <= ERROR
    {
        format(string2, sizeof(string2), ATMPATH, id);
        INI_ParseFile(string2, "loadatm_%s", .bExtra = true, .extra = id );
        ATMInfo[id][AtmPickup] = CreateDynamicPickup(1239, 1, ATMInfo[id][PosX], ATMInfo[id][PosY], ATMInfo[id][PosZ], 0);
        format(string2, sizeof(string2), "[ID: %d]\nGunakan /atm untuk membuka menu ATM", id);
        ATMInfo[id][AtmText] = CreateDynamic3DTextLabel(string, COLOR_WHITE, ATMInfo[id][PosX], ATMInfo[id][PosY], ATMInfo[id][PosZ]+0.5,30.0, .testlos = 1, .streamdistance = 30.0);
    }
I dont know whats wrong with that line, please help
Reply
#2

Show us MAX_ATM, and show us the lines above the error - it may lie there.
Reply
#3

pawn Код:
for(new id = 1;id < sizeof(MAX_ATM);id++) // <= ERROR
    {
        format(string2, sizeof(string2), ATMPATH, id);
        INI_ParseFile(string2, "loadatm_%s", bExtra = true, extra = id );
        ATMInfo[id][AtmPickup] = CreateDynamicPickup(1239, 1, ATMInfo[id][PosX], ATMInfo[id][PosY], ATMInfo[id][PosZ], 0);
        format(string2, sizeof(string2), "[ID: %d]\nGunakan /atm untuk membuka menu ATM", id);
        ATMInfo[id][AtmText] = CreateDynamic3DTextLabel(string, COLOR_WHITE, ATMInfo[id][PosX], ATMInfo[id][PosY], ATMInfo[id][PosZ]+0.5,30.0, .testlos = 1, .streamdistance = 30.0);
    }
Reply
#4

above the error
pawn Код:
new string2[500];
and the MAX_ATM
pawn Код:
#define MAX_ATM 200
Reply
#5

Quote:
Originally Posted by [HRD]Mar1
Посмотреть сообщение
pawn Код:
for(new id = 1;id < sizeof(MAX_ATM);id++) // <= ERROR
    {
        format(string2, sizeof(string2), ATMPATH, id);
        INI_ParseFile(string2, "loadatm_%s", bExtra = true, extra = id );
        ATMInfo[id][AtmPickup] = CreateDynamicPickup(1239, 1, ATMInfo[id][PosX], ATMInfo[id][PosY], ATMInfo[id][PosZ], 0);
        format(string2, sizeof(string2), "[ID: %d]\nGunakan /atm untuk membuka menu ATM", id);
        ATMInfo[id][AtmText] = CreateDynamic3DTextLabel(string, COLOR_WHITE, ATMInfo[id][PosX], ATMInfo[id][PosY], ATMInfo[id][PosZ]+0.5,30.0, .testlos = 1, .streamdistance = 30.0);
    }
Whats different ?
Reply
#6

pawn Код:
for(new id = 1;id < MAX_ATM;id++) // <= ERROR
    {
        format(string2, sizeof(string2), ATMPATH, id);
        INI_ParseFile(string2, "loadatm_%s", .bExtra = true, .extra = id );
        ATMInfo[id][AtmPickup] = CreateDynamicPickup(1239, 1, ATMInfo[id][PosX], ATMInfo[id][PosY], ATMInfo[id][PosZ], 0);
        format(string2, sizeof(string2), "[ID: %d]\nGunakan /atm untuk membuka menu ATM", id);
        ATMInfo[id][AtmText] = CreateDynamic3DTextLabel(string, COLOR_WHITE, ATMInfo[id][PosX], ATMInfo[id][PosY], ATMInfo[id][PosZ]+0.5,30.0, .testlos = 1, .streamdistance = 30.0);
    }
Reply
#7

Quote:
Originally Posted by [HRD]Mar1
Посмотреть сообщение
pawn Код:
for(new id = 1;id < MAX_ATM;id++) // <= ERROR
    {
        format(string2, sizeof(string2), ATMPATH, id);
        INI_ParseFile(string2, "loadatm_%s", .bExtra = true, .extra = id );
        ATMInfo[id][AtmPickup] = CreateDynamicPickup(1239, 1, ATMInfo[id][PosX], ATMInfo[id][PosY], ATMInfo[id][PosZ], 0);
        format(string2, sizeof(string2), "[ID: %d]\nGunakan /atm untuk membuka menu ATM", id);
        ATMInfo[id][AtmText] = CreateDynamic3DTextLabel(string, COLOR_WHITE, ATMInfo[id][PosX], ATMInfo[id][PosY], ATMInfo[id][PosZ]+0.5,30.0, .testlos = 1, .streamdistance = 30.0);
    }
I'll try it.. wait a moment.
Reply
#8

Quote:
Originally Posted by [HRD]Mar1
Посмотреть сообщение
pawn Код:
for(new id = 1;id < MAX_ATM;id++) // <= ERROR
    {
        format(string2, sizeof(string2), ATMPATH, id);
        INI_ParseFile(string2, "loadatm_%s", .bExtra = true, .extra = id );
        ATMInfo[id][AtmPickup] = CreateDynamicPickup(1239, 1, ATMInfo[id][PosX], ATMInfo[id][PosY], ATMInfo[id][PosZ], 0);
        format(string2, sizeof(string2), "[ID: %d]\nGunakan /atm untuk membuka menu ATM", id);
        ATMInfo[id][AtmText] = CreateDynamic3DTextLabel(string, COLOR_WHITE, ATMInfo[id][PosX], ATMInfo[id][PosY], ATMInfo[id][PosZ]+0.5,30.0, .testlos = 1, .streamdistance = 30.0);
    }
WOW, Nice, Thanks
Reply
#9

Np but rep+ me ^^ if you want http://forum.sa-mp.com/reputation.php?p=2290547
Reply
#10

Sure man, and thanks again
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)