Symbol already defined -
Pets - 14.06.2011
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?
Re: Symbol already defined -
Wesley221 - 14.06.2011
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);
}
?
Re: Symbol already defined -
Pets - 14.06.2011
Cant understand you wesley sorry
Re: Symbol already defined -
Mauzen - 14.06.2011
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.
Re: Symbol already defined -
Pets - 14.06.2011
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
Re: Symbol already defined -
Wesley221 - 14.06.2011
You know "}" is for closing a function/callback right..?
"{" is for opening a function/callback
Re: Symbol already defined -
Pets - 14.06.2011
Yes i know that.. and you are saying?
Re: Symbol already defined -
Wesley221 - 14.06.2011
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;
}
Re: Symbol already defined -
Pets - 14.06.2011
I want both timers to work, but if i open that brecket too, then i still get 26 errors..
Re: Symbol already defined -
Wesley221 - 14.06.2011
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
}