WhoAmI Posted May 6, 2015 Posted May 6, 2015 Hello. I'm trying to get data from .json page local loadCountries = function ( ) callRemote ( "http://country.io/names.json", loadCountriesCallback ); end But the problem is that debug says that argument 2 should be string, but i'm not providing host but URL... WARNING: [jacob]/country/country_s.lua:25: Bad argument @ 'callRemote' [Expected string at argument 2, got nil]
MTA Team botder Posted May 6, 2015 MTA Team Posted May 6, 2015 loadCountriesCallback is nil (not even a function). GitHub: Debug Console • MTA-Discord Relay Scripting: How to draw a line chart with DirectX functions? • Doppler Effect in MTA • Get the client's FPS • Customizable Blur Shader
WhoAmI Posted May 6, 2015 Author Posted May 6, 2015 Oh thanks, i had to put 'loadCountriesCallback' function before 'loadCountries'. Damn!
WhoAmI Posted May 6, 2015 Author Posted May 6, 2015 Getting error 405, which means A request was made of a resource using a request method not supported by that resource; for example, using GET on a form which requires data to be presented via POST, or using PUT on a read-only resource. How can I get this JSON array into my script?
Walid Posted May 6, 2015 Posted May 6, 2015 Getting error 405, which means A request was made of a resource using a request method not supported by that resource; for example, using GET on a form which requires data to be presented via POST, or using PUT on a read-only resource. How can I get this JSON array into my script? Bro did you create the call back function. Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
WhoAmI Posted May 6, 2015 Author Posted May 6, 2015 C'mon man, without callback function I wouldn't know what the error is, mr. Brain.
Walid Posted May 6, 2015 Posted May 6, 2015 C'mon man, without callback function I wouldn't know what the error is, mr. Brain. My bad i didn't see this "Getting error 405, which means" Mr. einstein. Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now