12 errors urgent -
hardiksingh5 - 18.03.2015
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(12 -- 14) : error 029: invalid expression, assumed zero
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(12 -- 16) : error 001: expected token: ")", but found "public"
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(19) : error 010: invalid function or declaration
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(22 -- 23) : error 029: invalid expression, assumed zero
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(22 -- 23) : warning 215: expression has no effect
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(24) : error 010: invalid function or declaration
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(27 -- 2

: error 017: undefined symbol "playerid"
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(27 -- 2

: error 001: expected token: ")", but found ";"
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(29) : error 001: expected token: ";", but found "return"
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(31) : error 010: invalid function or declaration
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(31) : error 001: expected token: "-identifier-", but found "-string-"
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(31) : error 010: invalid function or declaration
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(31) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
12 Errors.
Re: 12 errors urgent -
CalvinC - 18.03.2015
Show the code.
Re: 12 errors urgent -
hardiksingh5 - 18.03.2015
//my first gamemode
#include <a_samp>
#include <streamer>
#include <sscanf2>
#include <YSI\y_commands>
#define COLOR_RED 0xFF0000FF
main()
(
)
public Ongamemodeinit()
(
return 1;
)
public OnGameModeExit()
(
return 1;
)
public OnPlayerConnect()
(
SendClientMessage (playerid, COLOR_RED, "WELCOME TO THE AVIATION LIFE");
return 1;");
//message to all players
SendClientMessafeToALL (COLOR_RED<"A Player Has Joined the server");
return 1;
)
public OnPlayerDisconnect()
(
return 1;
)
Re: 12 errors urgent -
CalvinC - 18.03.2015
Use braces, not paranthesises.
And also, "return 1;");", what's that supposed to be?
Return stops the code, so it wont even reach the second SendClientMessageToAll.
Where you again misspelled it, it should me Message, not Messafe, and then "COLOR_RED<", should be "COLOR_RED,".
Then you also misspelled OnGameModeInit, remember that PAWN is case sensitive.
And lastly, OnPlayerConnect/Disconnect has a playerid parameter. "OnPlayerConnect(playerid)".
Re: 12 errors urgent -
hardiksingh5 - 18.03.2015
can u write the correct code i dont understand bro
Re: 12 errors urgent -
hardiksingh5 - 18.03.2015
\Users\Dell\Desktop\server\gamemodes\Untitled.pwn( 12 -- 14) : error 029: invalid expression, assumed zero
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(12 -- 16) : error 001: expected token: ")", but found "public"
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(19) : error 010: invalid function or declaration
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(22 -- 23) : error 029: invalid expression, assumed zero
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(22 -- 23) : warning 215: expression has no effect
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(24) : error 010: invalid function or declaration
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(27 -- 2

: error 017: undefined symbol "playerid"
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(27 -- 2

: error 001: expected token: ")", but found ";"
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(29) : error 001: expected token: ";", but found "return"
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(31) : error 010: invalid function or declaration
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(32) : error 010: invalid function or declaration
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(36 -- 37) : error 029: invalid expression, assumed zero
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(36 -- 37) : warning 215: expression has no effect
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(3

: error 010: invalid function or declaration
C:\Users\Dell\Desktop\server\gamemodes\Untitled.pw n(40) : warning 203: symbol is never used: "Ongamemodeinit"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
12 Errors.
Re: 12 errors urgent -
Karan007 - 18.03.2015
Код:
#include <a_samp>
#include <streamer>
#include <sscanf2>
#include <YSI\y_commands>
#define COLOR_RED 0xFF0000FF
main()
{
}
public Ongamemodeinit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerConnect()
{
SendClientMessage (playerid, COLOR_RED, "WELCOME TO THE AVIATION LIFE");
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s has joined the server. Welcome!",pName);
SendClientMessageToAll(0xFFFFFFAA,string);
return 1;
}
public OnPlayerDisconnect()
{
return 1;
}
Replace your code with this code.
Re: 12 errors urgent -
iFiras - 18.03.2015
Quote:
Originally Posted by CalvinC
Use braces, not paranthesises.
And also, "return 1;");", what's that supposed to be?
Return stops the code, so it wont even reach the second SendClientMessageToAll.
Where you again misspelled it, it should me Message, not Messafe, and then "COLOR_RED<", should be "COLOR_RED,".
Then you also misspelled OnGameModeInit, remember that PAWN is case sensitive.
And lastly, OnPlayerConnect/Disconnect has a playerid parameter. "OnPlayerConnect(playerid)".
|
Read this carefully, this explains why you encountred errors.
pawn Код:
#include <a_samp>
#include <streamer>
#include <sscanf2>
#include <YSI\y_commands>
#define COLOR_RED 0xFF0000FF
main()
{
return 1;
}
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid, COLOR_RED, "WELCOME TO THE AVIATION LIFE");
//message to all players
SendClientMessageToAll (COLOR_RED, "A Player Has Joined the server");
return 1;
}
public OnPlayerDisconnect(playerid)
{
return 1;
}
Re: 12 errors urgent -
CalvinC - 18.03.2015
Quote:
Originally Posted by iFiras
Read this carefully, this explains why you encountred errors.
|
The main-function should also have braces, not parenthesises.
Re: 12 errors urgent -
iFiras - 18.03.2015
Quote:
Originally Posted by CalvinC
The main-function should also have braces, not parenthesises.
|
Yes, I didn't pay attention, thank you.
Modified my post.
Re: 12 errors urgent -
hardiksingh5 - 18.03.2015
+ rep can u guys rep back
Re: 12 errors urgent -
Sew_Sumi - 18.03.2015
Quote:
Originally Posted by hardiksingh5
+ rep can u guys rep back
|
Why should they rep you? You're the one asking for help, they're the ones providing...
We don't rep people just because they asked for help, that's not what it's for.