Symbol already defined
#1

What do i do then if i get an error what says symbol already defined?


C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(452) : error 021: symbol already defined: "SetTimer"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


pawn Code:
SetTimer("InfNos",1000,1);
}
SetGameModeText("SS[0.01B - Spontex & K0bistaja]");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnGameModeExit()
{
return 1;
}
SetTimer("Teade", 60000, true);
}
These are 2 SetTimers but how i get rid of the error?
Reply
#2

What is the

pawn Code:
}
SetGameModeText("SS[0.01B - Spontex & K0bistaja]");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}

//===== And =====

}
SetTimer("Teade", 60000, true);
}
?
Reply
#3

Cant understand you wesley sorry
Reply
#4

You placed a SetTimer outside of any function body (outside of brackets) so the compiler thinks you want to define a function with that name.
Be sure every bracket you open is closed later, your code looks quite mixed up.
Reply
#5

If i do like this then:

C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(451) : warning 225: unreachable code
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(451) : error 029: invalid expression, assumed zero
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(451) : error 004: function "OnPlayerRequestClass" is not implemented
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(453) : error 017: undefined symbol "playerid"
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(454) : error 017: undefined symbol "playerid"
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(455) : error 017: undefined symbol "playerid"
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(459) : warning 225: unreachable code
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(459) : error 029: invalid expression, assumed zero
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(459) : error 004: function "OnPlayerConnect" is not implemented
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(461) : error 017: undefined symbol "playerid"
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(462) : error 017: undefined symbol "playerid"
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(466) : warning 225: unreachable code
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(466) : error 029: invalid expression, assumed zero
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(466) : error 004: function "OnPlayerDisconnect" is not implemented
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(472) : warning 225: unreachable code
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(472) : error 029: invalid expression, assumed zero
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(472) : error 004: function "OnPlayerSpawn" is not implemented
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(473) : error 017: undefined symbol "playerid"
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(475) : error 029: invalid expression, assumed zero
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(475) : error 004: function "OnPlayerDeath" is not implemented
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(480) : warning 225: unreachable code
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(480) : error 029: invalid expression, assumed zero
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(480) : error 004: function "OnVehicleSpawn" is not implemented
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(485) : warning 225: unreachable code
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(485) : error 029: invalid expression, assumed zero
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(485) : error 004: function "OnVehicleDeath" is not implemented
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(490) : warning 225: unreachable code
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(490) : error 029: invalid expression, assumed zero
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(490) : error 004: function "OnPlayerText" is not implemented
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(495) : warning 225: unreachable code
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(495) : error 029: invalid expression, assumed zero
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(495) : error 004: function "OnPlayerCommandText" is not implemented
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(497) : error 017: undefined symbol "cmdtext"
C:\Users\Raks\Desktop\samp03csvr_RC7_win32\gamemod es\raksigm.pwn(499) : error 017: undefined symbol "playerid"

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.

pawn Code:
SetTimer("InfNos",1000,1);
}
SetTimer("Teade", 60000, true);
SetGameModeText("SS[0.01B - Spontex & K0bistaja]");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
But the settimer for Infnos works, but timer for Teade doesnt work, why is that? and i dont know how to fix it
Reply
#6

You know "}" is for closing a function/callback right..?

"{" is for opening a function/callback
Reply
#7

Yes i know that.. and you are saying?
Reply
#8

Well, take a look at your code:
pawn Code:
SetTimer("InfNos",1000,1);
} //<-- your closing something here, but what are you closing? Do you want to open the timer, or what do you want with this?
SetTimer("Teade", 60000, true);
SetGameModeText("SS[0.01B - Spontex & K0bistaja]");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
Reply
#9

I want both timers to work, but if i open that brecket too, then i still get 26 errors..
Reply
#10

So if i did understand you, you want inside the "InfNos" timer, the things you posted under it?
If so:

pawn Code:
forward InfNos();
public InfNos()
{
// put the code what the InfNos timer should do
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)