got this error
#1

i added some codes in my gamemode i got this error

C:\DOCUME~1\JTECHC~1\Desktop\NEWFOL~1\GAMEMO~1\PPC _TR~1.PWN(1467) : error 021: symbol already defined: "Streamer_OnGameModeInit"
C:\DOCUME~1\JTECHC~1\Desktop\NEWFOL~1\GAMEMO~1\PPC _TR~1.PWN(1487) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error
help me........
Reply
#2

Have include <Streamer> ?
And at warning put on the top of your script
Код:
#pragma tabsize 0
Reply
#3

It's quite clear message. You have double Streamer_OnGameModeInit in your pwn (dobule include?), and in line 1487 there are messed tabulators. Pragma tabsize is not a good habit
Reply
#4

pawn Код:
#pragma tabsize 0
that's is for a poor indentation -,-

[pawn]//top of script
#include streamer [pawn]
download the latest version of streamer
Reply
#5

i puted codes in gamemode like
public OnGameModeInit ()
{
createobject...................
return 1;
}
i did #include <streamer>
and #pragma tabsize 0 and now it gives me error

C:\DOCUME~1\JTECHC~1\Desktop\NEWFOL~1\GAMEMO~1\PPC _TR~1.PWN(1469) : error 021: symbol already defined: "Streamer_OnGameModeInit"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Reply
#6

The compiler does not include the same file twice, unless you tell it to do so by explicitly undefining a definition that's set by the preprocessor.

Edit: Includes must be at the top of the script, otherwise you'll mess up the callback hooking.
Reply
#7

Remove the pragma and fix tabulation.

The error says that you have duplicate symbol, not a lacking one. Show lines 1440-1480
Reply
#8

CTRL + G = 1469

it should show u this Streamer_OnGameModeInit
Reply
#9

line 1440-1480
SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_LOOK_LEFT key");
if ((newkeys & KEY_SUBMISSION) && !(oldkeys & KEY_SUBMISSION))
SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_SUBMISSION key");
if ((newkeys & KEY_LOOK_BEHIND) && !(oldkeys & KEY_LOOK_BEHIND))
SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_LOOK_BEHIND key");
if ((newkeys & KEY_WALK) && !(oldkeys & KEY_WALK))
SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_WALK key");
if ((newkeys & KEY_ANALOG_UP) && !(oldkeys & KEY_ANALOG_UP))
SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_ANALOG_UP key");
if ((newkeys & KEY_ANALOG_DOWN) && !(oldkeys & KEY_ANALOG_DOWN))
SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_ANALOG_DOWN key");
if ((newkeys & KEY_ANALOG_LEFT) && !(oldkeys & KEY_ANALOG_LEFT))
SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_ANALOG_LEFT key");
if ((newkeys & KEY_ANALOG_RIGHT) && !(oldkeys & KEY_ANALOG_RIGHT))
SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_ANALOG_RIGHT key");
if ((newkeys & KEY_UP) && !(oldkeys & KEY_UP))
SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_UP key");
if ((newkeys & KEY_DOWN) && !(oldkeys & KEY_DOWN))
SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_DOWN key");
if ((newkeys & KEY_LEFT) && !(oldkeys & KEY_LEFT))
SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_LEFT key");
if ((newkeys & KEY_RIGHT) && !(oldkeys & KEY_RIGHT))
SendClientMessage(playerid, 0x0000FFFF, "You pressed the KEY_RIGHT key");

return 1;
}
#include <streamer>
#pragma tabsize 0
public OnGameModeInit ()
{
CreateObject(1337,2237.69433594,-2794.74511719,5.16710663,0.00000000,0.00000000,0.0 0000000); //object(binnt07_la) (1)
CreateObject(4108,2249.60009766,-2763.19995117,12.60000038,0.00000000,0.00000000,0. 00000000); //object(roads01b_lan) (1)
CreateObject(4108,2249.50000000,-2872.50000000,12.39999962,0.00000000,0.00000000,0. 00000000); //object(roads01b_lan) (2)
CreateObject(4108,2248.89990234,-2950.10009766,12.30000019,0.00000000,0.00000000,35 8.00000000); //object(roads01b_lan) (3)
CreateObject(10969,2245.00000000,-2995.69995117,12.19999981,0.00000000,0.00000000,0. 00000000); //object(groundbit_06_sfs) (1)
CreateObject(1337,2347.32226562,-3085.06835938,2.80396461,0.00000000,0.00000000,0.0 0000000); //object(binnt07_la) (2)
CreateObject(10969,2247.30004883,-2998.50000000,18.00000000,0.00000000,0.00000000,34 6.00000000); //object(groundbit_06_sfs) (2)
CreateObject(7299,2259.89990234,-2941.80004883,15.00000000,0.00000000,0.00000000,0. 00000000); //object(vgnntrainfence02b) (1)
CreateObject(7299,2240.00000000,-2950.19995117,13.39999962,0.00000000,0.00000000,0. 00000000); //object(vgnntrainfence02b) (2)
CreateObject(5112,2984.60009766,-770.09997559,5.69999981,0.00000000,0.00000000,0.00 000000); //object(laroads_26_las2) (1)
CreateObject(5112,3136.30004883,-770.20001221,5.80000019,0.00000000,0.00000000,0.00 000000); //object(laroads_26_las2) (2)
Reply
#10

guyzz it now give me error on that line where i have puted public OnGameModeInit
C:\DOCUME~1\JTECHC~1\Desktop\NEWFOL~1\GAMEMO~1\PPC _TR~1.PWN(146 : error 010: invalid function or declaration
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)