AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   need help input line too long (https://forums.alliedmods.net/showthread.php?t=314068)

sixten_8_9@ 02-02-2019 10:34

need help input line too long
 
Need help input line too long (after substitutions)

PHP Code:

formatex(iQ,1023,"INSERT INTO %s_bans (type, steam, ip, name, reason, length, server_id, admin_id, admin_ip, create_time) VALUES  ('%s', '%s', '%s', UNIX_TIMESTAMP(), UNIX_TIMESTAMP() + %d, %d, '%s', IFNULL((SELECT admin_id FROM %s_admins WHERE steam = '%s' OR steam REGEXP '^^%s$'),'0'), '%s', (SELECT server_id FROM %s_servers WHERE ip = '%s' AND port='%s' LIMIT 0,1), ' ')"prefixIpsteamName, (banTime*60), (banTime*60), ReasonprefixAdminAuthidAdminAuthidadmin_ipprefixServerIpServerPort


CrazY. 02-02-2019 11:10

Re: need help input line too long
 
Code:
new szBuffer[1023], iLen; iLen = formatex(szBuffer, charsmax(szBuffer), "INSERT INTO %s_bans (type, steam, ip, name, reason, length, server_id, admin_id, admin_ip, create_time)", prefix); iLen += formatex(szBuffer[iLen], charsmax(szBuffer) - iLen, "VALUES  ('%s', '%s', '%s', UNIX_TIMESTAMP(), UNIX_TIMESTAMP() + %d, %d, '%s',", Ip, steam, Name, (banTime*60), (banTime*60), Reason) iLen += formatex(szBuffer[iLen], charsmax(szBuffer) - iLen, "IFNULL((SELECT admin_id FROM %s_admins WHERE steam = '%s' OR steam REGEXP '^^%s$'),'0'), '%s', ", prefix, AdminAuthid, AdminAuthid, admin_ip) iLen += formatex(szBuffer[iLen], charsmax(szBuffer) - iLen, "(SELECT server_id FROM %s_servers WHERE ip = '%s' AND port='%s' LIMIT 0,1), ' ')", prefix, ServerIp, ServerPort)


All times are GMT -4. The time now is 07:36.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.