argument type mismatch
Hello guys. I'm trying to understand where's the problem with my code here.
If I try to call my function "MessageEveryone" and pass it a string as argument, the compiler returns me "argument type mismatch" This is how I'm trying to test it: PHP Code:
PHP Code:
PHP Code:
|
Re: argument type mismatch
You need to understand how strings are stored in Pawn. You can take a look at one of the introductions to Pawn programming (e.g. here and here).
Long story short, strings are arrays of characters, your argument in your definition of MessageEveryone() needs to be an array: Code:
MessageEveryone(message[]) Code:
new iPlayers[32], iNumPlayers, id |
Re: argument type mismatch
PHP Code:
https://wiki.alliedmods.net/Pawn PHP Code:
PHP Code:
|
Re: argument type mismatch
Thank you so much guys. It worked like a charm now. And thank you fysiks, will have that in mind for the future :)
|
All times are GMT -4. The time now is 22:02. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.