![]() |
|
PreCompiler - Printable Version +- Las Venturas Playground (https://forum.sa-mp.nl) +-- Forum: Main Talk (https://forum.sa-mp.nl/forum-3.html) +--- Forum: Development (https://forum.sa-mp.nl/forum-16.html) +--- Thread: PreCompiler (/thread-23107.html) |
PreCompiler - Matthias - 04-17-2010 Hello, I'm trying to make a class but I have some problems, I'll just post here since I seem to keep missing Peter @ IRC. [07:26:54] <Matthias> Peter, how would I call a timer? [16:34:40] [07:26:55] <Matthias> do I do: [16:34:46] [07:26:55] <Matthias> SetTimer("WalkiesWeaponsTeamWar->CheckTimer", WWTW_SIGNUPTIME * 1000, false); [16:34:54] [07:26:55] <Matthias> or [16:34:55] [07:26:55] <Matthias> SetTimer("this->CheckTimer", WWTW_SIGNUPTIME * 1000, false); [16:35:04] [07:26:55] <Matthias> (called from within the class) [16:35:11] [07:26:55] <@Pugwipe> neither nor [16:38:01] [07:26:55] <Matthias> Then just "CheckTimer"? [16:38:14] [07:26:55] <@Pugwipe> I dunno [16:38:28] [07:26:55] <Matthias> Why does new ohai; give me invalid function or declaration? [17:36:56] [07:26:55] <Matthias> Also, using a comment right after a { will error [17:40:08] [07:26:55] <Matthias> public Hello() [17:40:15] [07:26:55] <Matthias> { [17:40:15] [07:26:55] <Matthias> // comment here [17:40:22] [07:26:55] <Matthias> someFunction(); [17:40:26] [07:26:55] <Matthias> } [17:40:28] [07:26:55] <Matthias> will error [17:40:29] I used everything as the documentation said, but couldn't get it to compile :<. Matthias |