SA-MP Forums Archive
C:\Usererror 001: expected token: ";", but found "new" - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: C:\Usererror 001: expected token: ";", but found "new" (/showthread.php?tid=401330)



C:\Usererror 001: expected token: ";", but found "new" - Patrick - 22.12.2012

Hello guys. im kinda lost on my scripting. i've been scripting for 6 hours for my server i am now making a payday but i get this error
pawn Код:
C:\Users\Subang\Desktop\[IT]SFCNR Orignal\gamemodes\IT.pwn(19223) : error 001: expected token: ";", but found "new"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
My Function that i am doing
pawn Код:
public PayDay()
{
    //Variables
    new string[128]
    new mrand =random(30000);
    //
    if(gametime == 12 && gameday == 1)
    {
    for(new i; i<MAX_PLAYERS; i++) //checks through all players
    {
    format(string, sizeof(string),"~w~Pay ~b~Day: %s", mrand);
    GameTextForAll(string, 5000, 3);
    }
    }
    return 1;
}



Re: C:\Usererror 001: expected token: ";", but found "new" - Lynn - 22.12.2012

pawn Код:
new string[128];
You for got the " ; " after new string[128]


Re: C:\Usererror 001: expected token: ";", but found "new" - Patrick - 22.12.2012

Lynn Thanks + rep i will have a rest now