expected token: ";", but found "stock"
#1

So, i'm having this error:

Код:
error 001: expected token: ";", but found "stock"
on this line:

Код:
stock PlayerName(playerid)
{
	new pName[MAX_PLAYER_NAME];
	GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
	return pName;
}
Anyone know how to fix it?
Reply
#2

pawn Код:
stock PlayerName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    return name;
}
Reply
#3

Quote:
Originally Posted by Glad2BeHere
Посмотреть сообщение
pawn Код:
stock PlayerName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    return name;
}
Still getting the same error message when I go to compile it
Reply
#4

Look , Get all the line but in error's detail's in "(())" That's he write you what the line of error's what exctly the line update it with all what connect to this... and we'll see...
Reply
#5

Quote:
Originally Posted by yaron0600
Посмотреть сообщение
Look , Get all the line but in error's detail's in "(())" That's he write you what the line of error's what exctly the line update it with all what connect to this... and we'll see...
Код:
C:\Users\Jayden\Desktop\samp server\filterscripts\avs.pwn(510) : error 001: expected token: ";", but found "stock"

Код:
stock PlayerName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    return name;
}
Reply
#6

The error (missing a semi-colon) is on a line or two before that of which the compiler is giving you.
Reply
#7

Quote:
Originally Posted by Bakr
Посмотреть сообщение
The error (missing a semi-colon) is on a line or two before that of which the compiler is giving you.
Yup, that worked. How didn't I notice that :3


I needed to do this:


Код:
forward StopAlarm(vehicleid); // add this

stock PlayerName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    return name;
}
+1, Solved
Reply
#8

Show the Lines Before that its not that stock it has to something else show lines before or even entire script
Reply
#9

Quote:
Originally Posted by Glad2BeHere
Посмотреть сообщение
Show the Lines Before that its not that stock it has to something else show lines before or even entire script
I'm not glad you're here.

Also, how are you "becoming certified" in a language you do not even know the name of?
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)