Skip to content
Permalink
Browse files

Fix compile errors with latest sourcepawn changes (SourceMod 6383+)

  • Loading branch information...
Bara committed Feb 19, 2019
1 parent 6b2ce7e commit dac1ec86d4a886bac8a721764de52df51171945b
@@ -67,7 +67,7 @@ methodmap Role < Handle {
public bool Mentionable() {
return JsonObjectGetBool(this, "mentionable");
}
}
};

methodmap RoleList < Handle {
property int Size {
@@ -84,7 +84,7 @@ methodmap RoleList < Handle {
return this.GetRole(i);
}

}
};

/*
{
@@ -116,7 +116,7 @@ methodmap DiscordUser < Handle {
public native void GetEmail(char[] buffer, int maxlength);

public native bool IsBot();
}
};

/*
@@ -132,7 +132,7 @@ methodmap DiscordMessage < Handle {
public native void GetContent(char[] buffer, int maxlength);

public native void GetChannelID(char[] buffer, int maxlength);
}
};

#include <discord/channel>
#include <discord/message_embed>
@@ -26,4 +26,4 @@ methodmap DiscordGuildUser < Handle {
public bool IsMute() {
return JsonObjectGetBool(this, "mute");
}
}
};
@@ -228,4 +228,4 @@ methodmap DiscordBot < StringMap {
public native void GetGuildMembersAll(char[] guild, OnGetMembers fCallback, int perPage=250, char[] afterUserID="");

public native void GetGuildRoles(char[] guild, DiscordGuildGetRoles fCallback, any data);
}
};
@@ -74,4 +74,4 @@ methodmap DiscordChannel < StringMap {
return this.Type == GUILD_TEXT;
}
}
}
};
@@ -125,4 +125,4 @@ methodmap MessageEmbed < Handle {
public void SetURL(const char[] url) {
json_object_set_new(this, "url", json_string(url));
}
}
};
@@ -65,7 +65,8 @@ stock bool JsonObjectGetBool(Handle hElement, char[] key, bool defaultvalue=fals

stock float JsonObjectGetFloat(Handle hJson, char[] key, float defaultValue=0.0) {
Handle hObject = json_object_get(hJson, key);
if(hObject == INVALID_HANDLE) return defaultValue;
if(hObject == INVALID_HANDLE)
return defaultValue;

float value = defaultValue;
if(json_is_integer(hObject)) {
@@ -79,4 +80,4 @@ stock float JsonObjectGetFloat(Handle hJson, char[] key, float defaultValue=0.0)
}
CloseHandle(hObject);
return value;
}
}
@@ -139,4 +139,4 @@ methodmap DiscordWebHook < Handle {
}*/

public native void Send();
}
};

0 comments on commit dac1ec8

Please sign in to comment.
You can’t perform that action at this time.