What am I doing wrong?
Hey guys,
I'm currently writing my first plugin in SourcePawn. I understand the basics of programming but have no idea of SourcePawn. I think there are just some minor issues but the plugin should work if they are fixed. I couldn't really figure out how the timer works so there might be some problems with it. I also can't figure out what to put as parameters inside the brackets of "Event_PlayerDeath" and "PrintMessage". This is my code: Code:
#include <sourcemod> Thanks already, hazetank |
Re: What am I doing wrong?
you can't add variables to a dynamic string like this in sourcemod:
PHP Code:
PHP Code:
Here's a fixed up version of your code to help you learn for your specific case. PHP Code:
https://sm.alliedmods.net/new-api/ |
Re: What am I doing wrong?
I suggest you also have a look at the new api, you never know 8
|
Re: What am I doing wrong?
The countdownTimer variable is never decremented and would stay as 30 with that code.
|
Re: What am I doing wrong?
Thanks to all of you guys, especially thanks for this:
Quote:
Why ''MAXPLAYRRS+1'' / what does is affect? What does ''IsValidClient'' mean? Thanks for your help already, hazetank |
Re: What am I doing wrong?
Quote:
MAXPLAYERS is simply a constant provided by sourcemod that translates into the maximum number of players that you can have on the server. Quote:
|
Re: What am I doing wrong?
Quote:
|
Re: What am I doing wrong?
Quote:
I just wanted to compile your code but i got an error :( Code:
/home/groups/sourcemod/upload_tmp/phpWyXe2k.sp(31) : error 017: undefined symbol "clientid" Code:
new client = GetClientOfUserId(clientid); Code:
new client = GetClientOfUserId(GetEventInt(event,"userid")); Code:
/home/groups/sourcemod/upload_tmp/phpbyyDOm.sp(31) : error 017: undefined symbol "event" Some last help would be amazing :3 Sorry for beeing unable to fix it myself :( Thanks already, hazetank |
Re: What am I doing wrong?
PHP Code:
|
Re: What am I doing wrong?
Quote:
|
All times are GMT -4. The time now is 08:49. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.