Assinging string to array
Hello, here is some of my code:
Code:
I am having problems with "g_customTeam[id] = message". Sitatuion: A player times in gangwars_maketeam Dest's Team I tried to make it store the user's team as Dest's Team, but... -with "g_customTeam[id] = message" it just comes out blank. -with "set_msg_arg_string ( message, g_customTeam[id] )" it comes out as arguemnt mismatch -with "g_customTeam[id] += message" it says message must be indexed. I really do not know what to do, tried search and it came out with g_customTeam[id] += message, but I do not know where to go now. |
if its a string you need new g_customTeam[33][192]
and then in your functinon add(g_customTeam[id] , 191 , message) |
Interesting. Well I did that, and it gave me an error on the g_customTeam[33][191] = 0
So I took off "= 0", and that removed that error. But now I have g_team[id] = g_customTeam[id] And I am not quite sure how to edit this to fit... |
Sounds like you need to more fully understand strings in Pawn. Go to section 3 here.
|
Quote:
In Pawn string is array of char. If you want to create array of strings you need to type: Code:
new MyArrayOfStrings[num][str] |
| All times are GMT -4. The time now is 16:07. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.