[Solved]Need help with this string.
#1

I just wanna set a variable to a string set in a user file. I'm using dubd.

Код:
new name1[MAX_PLAYER_NAME] = dUser("Server").("topkills1name");
The error I get is..

error 008: must be a constant expression; assumed zero
Reply
#2

Surely someone can tell me what's wrong with this?
Reply
#3

maybe you should delete the . and put &
Reply
#4

You're only allowed to bump after 12 hours, not 1 hour.

You're trying to get the variable and use a full stop.

Use dUserSet(). The syntax is:
dUserSet(nickname[],key[],value[])
Reply
#5

Use dUser("Server").("topkills1name"); directly.
Reply
#6

Quote:
Originally Posted by CalgonX
You're only allowed to bump after 12 hours, not 1 hour.

You're trying to get the variable and use a full stop.

Use dUserSet(). The syntax is:
dUserSet(nickname[],key[],value[])
Ehh, are you sure? Wouldn't that be setting the string in the file?



Quote:
Originally Posted by [HiC
TheKiller ]
Use dUser("Server").("topkills1name"); directly.
If I do, then it uses up 256 cells. Which is a waste since the max a name can be is 24 cells right?
Reply
#7

just do what he sayed..
Reply
#8

pawn Код:
new name1[MAX_PLAYER_NAME];
Strcat(name, dUser("Server").("topkills1name"), MAX_PLAYER_NAME);
Reply
#9

Quote:
Originally Posted by dice7
pawn Код:
new name1[MAX_PLAYER_NAME];
Strcat(name, dUser("Server").("topkills1name"), MAX_PLAYER_NAME);
Thank you very much
Reply
#10

EDIT: Nevermind, solved.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)