Small Bug
#1

PHP код:
dcmd_adcmds(playerid,params[])
{
    
#pragma unused params
    
if(AdminLevel[playerid] == 1)
    {
        
ShowPlayerDialog(playerid,DIALOG_ADCMDS,DIALOG_STYLE_MSGBOX,"{10F441}ADMINISTRATOR Level 1 COMMANDS:","{FFFFFF}/adcmds /ad(un)mute /adwarn /ad [msg] /ad(un)jail /onduty /offduty /web /spec(off) /adinfo /ac","Ok","Cancel");
    }
    if(
AdminLevel[playerid] == 2)
    {
        
ShowPlayerDialog(playerid,DIALOG_ADCMDS,DIALOG_STYLE_MSGBOX,"{10F441}ADMINISTRATOR Level 2 COMMANDS:","{FFFFFF}/adcmds /ad(un)mute /adwarn /ad [msg] /ad(un)jail /onduty /offduty /web /spec(off) /adinfo /ac /ad(un)freeze /adkick /adkill /disarm /adjetpack /adheal /adcure /slap","Ok","Cancel");
    }
    if(
AdminLevel[playerid] == 3)
    {
        
ShowPlayerDialog(playerid,DIALOG_ADCMDS,DIALOG_STYLE_MSGBOX,"{10F441}ADMINISTRATOR Level 3 COMMANDS:","{FFFFFF}/adcmds /ad(un)mute /adwarn /ad [msg] /ad(un)jail /onduty /offduty /web /spec(off) /adinfo /ac\n /ad(un)freeze /adkick /adkill /disarm /adjetpack /adheal /adcure /slap\n /adan /goto /bring /setrp /takerp /adgc /tprpl /tpadmin /settrp /taketrp\n /ad(un)ban /setarmy /takearmy /setcia /takecia","Ok","Cancel");
    }
    if(
AdminLevel[playerid] >= 4)
    {
        
ShowPlayerDialog(playerid,DIALOG_ADCMDS,DIALOG_STYLE_MSGBOX,"{10F441}ADMINISTRATOR Level 4+ COMMANDS:","{FFFFFF}/adcmds /ad(un)mute /adwarn /ad [msg] /ad(un)jail /onduty /offduty /web /spec(off) /adinfo /ac\n /ad(un)freeze /adkick /adkill /disarm /adjetpack /adheal /adcure /slap\n /adan /goto /bring /setrp /takerp /adgc /tprpl /tpadmin /settrp /taketrp\n /ad(un)ban /setarmy /takearmy /setcia /takecia\n /adblow /setscore /setcoprank /setrobskill /settrskill\n /setbank /adgw /setvip /setbcards","Ok","Cancel");
    }
    return 
1;

PHP код:
D:\Games\GTA SA\MyEgy.CoM.GTA.S.A\SFCRRPGv1.1\LVCNR\gamemodes\SFCRRPG.pwn(5729) : error 075input line too long (after substitutions)
D:\Games\GTA SA\MyEgy.CoM.GTA.S.A\SFCRRPGv1.1\LVCNR\gamemodes\SFCRRPG.pwn(5730) : error 037invalid string (possibly non-terminated string)
D:\Games\GTA SA\MyEgy.CoM.GTA.S.A\SFCRRPGv1.1\LVCNR\gamemodes\SFCRRPG.pwn(5730) : error 017undefined symbol "C"
D:\Games\GTA SA\MyEgy.CoM.GTA.S.A\SFCRRPGv1.1\LVCNR\gamemodes\SFCRRPG.pwn(5731) : error 017undefined symbol "ancel"
D:\Games\GTA SA\MyEgy.CoM.GTA.S.A\SFCRRPGv1.1\LVCNR\gamemodes\SFCRRPG.pwn(5731) : warning 215expression has no effect
D
:\Games\GTA SA\MyEgy.CoM.GTA.S.A\SFCRRPGv1.1\LVCNR\gamemodes\SFCRRPG.pwn(5731) : error 001expected token";"but found ")"
D:\Games\GTA SA\MyEgy.CoM.GTA.S.A\SFCRRPGv1.1\LVCNR\gamemodes\SFCRRPG.pwn(5731) : error 029invalid expressionassumed zero
D
:\Games\GTA SA\MyEgy.CoM.GTA.S.A\SFCRRPGv1.1\LVCNR\gamemodes\SFCRRPG.pwn(5731) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
7 Errors

Reply
#2

use strcat
Reply
#3

can't change coz i'm using dcmd in all commands and it used to work
Reply
#4

You shall use strcat with dcmd, just search for a tutorial
Reply
#5

first of all he mean use strcat, it doesn't mean replace dcmd.

Facepalm He means use strcat to connect each strings.
Reply
#6

so why this work and mine don't ?

PHP код:
dcmd_adcmds(playerid,params[])
{
    
#pragma unused params
    
if(AdminLevel[playerid] == 1)
    {
        
ShowPlayerDialog(playerid,DIALOG_ADCMDS,DIALOG_STYLE_MSGBOX,"{10F441}ADMINISTRATOR Level 1 COMMANDS:","{FFFFFF}/ad(un)mute /adwarn /ad(un)freeze /ad(un)jail /spec(off) /clearchat /disarm /adon /adoff","Ok","Cancel");
    }
    if(
AdminLevel[playerid] == 2)
    {
        
ShowPlayerDialog(playerid,DIALOG_ADCMDS,DIALOG_STYLE_MSGBOX,"{10F441}ADMINISTRATOR Level 2 COMMANDS:","{FFFFFF}/adkill /adjetpack /slap /ad(nounce) /kick /setarmour /sethealth /adcure\n/ad(un)mute /adwarn /adwarn /ad(un)freeze /ad(un)jail /spec(off) /clearchat /disarm /adon /adoff /getstats","Ok","Cancel");
    }
    if(
AdminLevel[playerid] == 3)
    {
        
ShowPlayerDialog(playerid,DIALOG_ADCMDS,DIALOG_STYLE_MSGBOX,"{10F441}ADMINISTRATOR Level 3 COMMANDS:","{FFFFFF}/ban /adblow /adgc /adgw /goto /bring /setscore /setrp /takerp /setpwl /ad(un)swat /setcia /takecia /adcure\n/sethealth /setarmour /kick /an(nounce) /slap /adjetpack /adkill /adoff /adon\n/disarm /clearchat /spec(off) /ad(un)jail /ad(un)freeze\n/adwarn /ad(un)mute /getstats","Ok","Cancel");
    }
    if(
AdminLevel[playerid] == 4)
    {
        
ShowPlayerDialog(playerid,DIALOG_ADCMDS,DIALOG_STYLE_MSGBOX,"{10F441}ADMINISTRATOR Level 4 COMMANDS:","{FFFFFF}/setskin /setvip /banip /setarmy /takearmy /takecia /setcia /ad(un)swat /setpwl /takerp /setrp /setscore /bring /goto\n/adgw /adgc /adblow /ban /adcure /sethealth /setarmour /kick /an(nounce)\n/slap /adjetpack /adkill /adoff /adon /disarm /clearchat /spec(off)\n/ad(un)jail /ad(un)freeze /adwarn /ad(un)mute /getstats","Ok","Cancel");
    }
    return 
1;

EDIT: Fixed

But

PHP код:
D:\Games\GTA SA\MyEgy.CoM.GTA.S.A\SFCRRPGv1.1\LVCNR\gamemodes\SFCRRPG.pwn(3776) : error 075input line too long (after substitutions)
D:\Games\GTA SA\MyEgy.CoM.GTA.S.A\SFCRRPGv1.1\LVCNR\gamemodes\SFCRRPG.pwn(3781) : error 075input line too long (after substitutions)
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
2 Errors

I changed it to

PHP код:
dcmd_adcmds(playerid,params[])
{
    
#pragma unused params
    
if(AdminLevel[playerid] == 1)
    {
        
ShowPlayerDialog(playerid,DIALOG_ADCMDS,DIALOG_STYLE_MSGBOX,"{10F441}ADMINISTRATOR Level 1 COMMANDS:","{FFFFFF}/adcmds /ad(un)mute /adwarn /ad [msg] /ad(un)jail /onduty /offduty /web /spec(off) /adinfo /ac","Ok","Cancel");
    }
    if(
AdminLevel[playerid] == 2)
    {
        
ShowPlayerDialog(playerid,DIALOG_ADCMDS,DIALOG_STYLE_MSGBOX,"{10F441}ADMINISTRATOR Level 2 COMMANDS:","{FFFFFF}/adcmds /ad(un)mute /adwarn /ad [msg] /ad(un)jail /onduty /offduty /web /spec(off) /adinfo /ac /ad(un)freeze /adkick /adkill /disarm /adjetpack /adheal /adcure /slap","Ok","Cancel");
    }
    if(
AdminLevel[playerid] == 3)
    {
        
ShowPlayerDialog(playerid,DIALOG_ADCMDS,DIALOG_STYLE_MSGBOX,"{10F441}ADMINISTRATOR Level 3 COMMANDS:","{FFFFFF}/adcmds /ad(un)mute /adwarn /ad [msg] /ad(un)jail /onduty /offduty /web /spec(off) /adinfo /ac\n /ad(un)freeze /adkick /adkill /disarm /adjetpack /adheal /adcure /slap\n /adan /goto /bring /setrp /takerp /adgc /tprpl /tpadmin /settrp /taketrp\n /ad(un)ban /setarmy /takearmy /setcia /takecia","Ok","Cancel");
    }
    if(
AdminLevel[playerid] == 4)
    {
        
ShowPlayerDialog(playerid,DIALOG_ADCMDS,DIALOG_STYLE_MSGBOX,"{10F441}ADMINISTRATOR Level 4+ COMMANDS:","{FFFFFF}/adcmds /ad(un)mute /adwarn /ad [msg] /ad(un)jail /onduty /offduty /web /spec(off) /adinfo /ac\n /ad(un)freeze /adkick /adkill /disarm /adjetpack /adheal /adcure /slap\n /adan /goto /bring /setrp /takerp /adgc /tprpl /tpadmin /settrp /taketrp\n /ad(un)ban /setarmy /takearmy /setcia /takecia\n /adblow /setscore /setcoprank /setrobskill /settrskill\n /setbank /adgw /setvip /setbcards","Ok","Cancel");
    }
    if(
AdminLevel[playerid] == 5)
    {
        
ShowPlayerDialog(playerid,DIALOG_ADCMDS,DIALOG_STYLE_MSGBOX,"{10F441}ADMINISTRATOR Level 4+ COMMANDS:","{FFFFFF}/adcmds /ad(un)mute /adwarn /ad [msg] /ad(un)jail /onduty /offduty /web /spec(off) /adinfo /ac\n /ad(un)freeze /adkick /adkill /disarm /adjetpack /adheal /adcure /slap\n /adan /goto /bring /setrp /takerp /adgc /tprpl /tpadmin /settrp /taketrp\n /ad(un)ban /setarmy /takearmy /setcia /takecia\n /adblow /setscore /setcoprank /setrobskill /settrskill\n /setbank /adgw /setvip /setbcards","Ok","Cancel");
    }
    return 
1;

Reply
#7

:facepalm:

USE STRCAT

https://sampwiki.blast.hk/wiki/strcat
Reply
#8

yeah, those errors are because the imput line is too long. As kirollos said, Use STRCAT

EDIT: :< Kirollos just posted before

Example

PHP код:
new string[952];
strcat(string"[ADMIN CMDS] Commands]/credits,/help,/kill,/afk,/back,/me,/v,/givecash,/fix,/flip,/tts,/ttsstop,/skin,/report,/admin,/pm,/admins,/radio\n");
strcat(string"[Server Commands]/addboject,/objectids,/boneids\n");
strcat(string"[Admin Commands (1)]/s,/soff,/explode,/slap,/mute,/unmute\n");
strcat(string"[Admin Commands (2)]/duty,/dutyoff,/fr(eeze),/unfr(eeze),/cc\n");
strcat(string"[Admin Commands (3)]/rac,/recon\n");
strcat(string"[Admin Commands (4)]/bring,/goto,/heal,/healall,/adminradio,/radiooff\n");
strcat(string"[Admin Commands (5)]/gmx");
ShowPlayerDialog(playerid44DIALOG_STYLE_MSGBOX"Help"string"OK"""); 
Reply
#9

It doesn't seems have any problem... Maybe you've given some wrong lines?
Reply
#10

Msg dialogs has a limit, the strcat destroy that limit and makes more room for more strings and characters, thats why you get unknown errors such as C is undefined so on..!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)